[Bug c++/77775] [7 Regression] since r238559 Kdevelop gets miscompiled

2016-09-29 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=5

--- Comment #5 from Markus Trippelsdorf  ---
;; Function void Sublime::Area::qt_static_metacall() (null)
;; enabled by -tree-original


{
  typedef struct _t _t;

  if (1B->__pfn == ((struct _t) {.__pfn=viewAdded, .__delta=0}).__pfn &&
(1B->__delta == ((struct _t) {.__pfn=viewAdded, .__delta=0}).__delta ||
1B->__pfn == 0B))
{
  <;
}
}

vs.

;; Function void Sublime::Area::qt_static_metacall() (null)
;; enabled by -tree-original


{
  typedef struct _t _t;

  if (1B->__pfn == 0B && (1B->__delta == ((struct _t) {.__pfn=viewAdded,
.__delta=0}).__delta || 1B->__pfn == 0B))
{
  <;
}
}

Jason?

[Bug fortran/77707] [5/6/7 Regression] formatted direct access: nextrec off by one

2016-09-29 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77707

--- Comment #8 from Jerry DeLisle  ---
Author: jvdelisle
Date: Fri Sep 30 04:49:36 2016
New Revision: 240645

URL: https://gcc.gnu.org/viewcvs?rev=240645=gcc=rev
Log:
2016-09-29  Jerry DeLisle  

Backport from trunk
PR libgfortran/77707
io/transfer.c (next_record): Flush before calculating next_record.
Correctly calculate.

* gfortran.dg/inquire_17.f90: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/inquire_17.f90
Modified:
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/libgfortran/ChangeLog
branches/gcc-5-branch/libgfortran/io/transfer.c

[Bug bootstrap/77800] New: Undefined ref to host_detect_local_cpu on netbsd/arm

2016-09-29 Thread coypu at sdf dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77800

Bug ID: 77800
   Summary: Undefined ref to host_detect_local_cpu on netbsd/arm
   Product: gcc
   Version: 5.4.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: coypu at sdf dot org
  Target Milestone: ---

Hello,

Building GCC 5.4.0 on netbsd 7.0.1 armv6hf I encounter failure like:

gcc.o:(.rodata+0x58c4): undefined reference to `host_detect_local_cpu(int, char
const**)'

I believe this is because gcc/config.host includes driver-arm.o which defines
this function only on freebsd/arm and linux/arm.

NetBSD does have a procfs which is mounted by default. it usually does include
the expected useful info on /proc/cpuinfo (although not on netbsd-7.0.1/arm,
maybe this will change in a next release).

I am working around this by excluding the prototype for this function in
gcc/config/arm/arm.h.

I don't believe any of this has changed in GCC 5.4.1, but did not try to build
it yet.

[Bug fortran/77584] Unclassifiable statement error with procedure pointer using template named "structure_"

2016-09-29 Thread fritzoreese at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77584

--- Comment #4 from Fritz Reese  ---
Yes, fixed in r240230, I can't change the bug status myself or I would've

https://gcc.gnu.org/ml/fortran/2016-09/msg00105.html

On Thu, Sep 29, 2016, 21:06 dominiq at lps dot ens.fr <
gcc-bugzi...@gcc.gnu.org> wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77584
>
> Dominique d'Humieres  changed:
>
>What|Removed |Added
>
> 
>  Status|UNCONFIRMED |WAITING
>Last reconfirmed||2016-09-30
>  Ever confirmed|0   |1
>
> --- Comment #3 from Dominique d'Humieres  ---
> Isn't this PR fixed?
>
> --
> You are receiving this mail because:
> You are on the CC list for the bug.

[Bug middle-end/77799] New: missing -Wformat-length warning on a trivial sprintf overflow with no directives

2016-09-29 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77799

Bug ID: 77799
   Summary: missing -Wformat-length warning on a trivial sprintf
overflow with no directives
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

Similar to bug 77671, GCC warns for a call to sprintf with a format string
containing no format directives that writes past the end of the destination if
the call contains redundant (unused) arguments but fails to issue the same
warning when there are no arguments.  The underlying reason is the same as in
bug 77671: GCC transforms the call with no redundant arguments to one to memcpy
before the warning pass has a chance to see it.

$ cat zzz.c && /build/gcc-trunk-git/gcc/xgcc -B /build/gcc-trunk-git/gcc -O2 -S
-Wformat-length -fdump-tree-optimized=/dev/stdout zzz.c
char d [2];

extern int sprintf (char*, const char*, ...);

void f (void)
{
  sprintf (d, "123");
}

void g (void)
{ 
  sprintf (d, "123", 0);
}



;; Function f (f, funcdef_no=0, decl_uid=1795, cgraph_uid=0, symbol_order=1)

f ()
{
  :
  __builtin_memcpy (, "123", 4); [tail call]
  return;

}


zzz.c: In function ‘g’:
zzz.c:12:18: warning: writing format character ‘3’ at offset 2 past the end of
the destination [-Wformat-length=]
   sprintf (d, "123", 0);
  ^
zzz.c:12:3: note: format output 4 bytes into a destination of size 2
   sprintf (d, "123", 0);
   ^

;; Function g (g, funcdef_no=1, decl_uid=1798, cgraph_uid=1, symbol_order=2)

g ()
{
  :
  sprintf (, "123", 0); [tail call]
  return;

}

[Bug fortran/77584] Unclassifiable statement error with procedure pointer using template named "structure_"

2016-09-29 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77584

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2016-09-30
 Ever confirmed|0   |1

--- Comment #3 from Dominique d'Humieres  ---
Isn't this PR fixed?

[Bug middle-end/77798] New: 465.tonto ICE with trunk with -O2

2016-09-29 Thread prathamesh3492 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77798

Bug ID: 77798
   Summary: 465.tonto ICE with trunk with -O2
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: prathamesh3492 at gcc dot gnu.org
  Target Milestone: ---

Hi,
465.tonto from SPEC2006 ICE's with trunk with -O2 (tested with r240626):

intvec.fppized.f90: In function '__intvec_module_MOD_chop_large_values':
intvec.fppized.f90:394:0: error: bogus comparison result type
end subroutine

Error: bogus comparison result type
integer(kind=4)
_28 = bb_53 < 0;
intvec.fppized.f90:394:0: internal compiler error: verify_gimple failed
0xc6bb7c verify_gimple_in_cfg(function*, bool)
../../gcc/gcc/tree-cfg.c:5209
0xb5121a execute_function_todo
../../gcc/gcc/passes.c:1964
0xb51c55 execute_todo
../../gcc/gcc/passes.c:2014


Thanks,
Prathamesh

[Bug fortran/77420] [5/6/7 Regression] gfortran and equivalence produces internal compiler error

2016-09-29 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77420

--- Comment #8 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Sep 29 22:09:42 2016
New Revision: 240640

URL: https://gcc.gnu.org/viewcvs?rev=240640=gcc=rev
Log:
2016-09-29  Steven G. Kargl  

Backport from trunk

PR fortran/77420
* trans-common.c:  Handle array elements in equivalence when
the lower and upper bounds of array spec are NULL.

PR fortran/77460
* simplify.c (simplify_transformation_to_scalar):  On error, result
may be NULL, simply return.


2016-09-29  Steven G. Kargl  

Backport from trunk

PR fortran/77420
* gfortran.dg/pr77420_1.f90: New test.
* gfortran.dg/pr77420_2.f90: Ditto.
* gfortran.dg/pr77420_3.f90: New test. Requires ...
* gfortran.dg/pr77420_4.f90: this file.

PR fortran/77460
* gfortran.dg/pr77460.f90: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77420_1.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77420_2.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77420_3.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77420_4.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77460.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/simplify.c
branches/gcc-5-branch/gcc/fortran/trans-common.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug fortran/77460] ICE when summing an overflowing array

2016-09-29 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77460

--- Comment #4 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Sep 29 22:09:42 2016
New Revision: 240640

URL: https://gcc.gnu.org/viewcvs?rev=240640=gcc=rev
Log:
2016-09-29  Steven G. Kargl  

Backport from trunk

PR fortran/77420
* trans-common.c:  Handle array elements in equivalence when
the lower and upper bounds of array spec are NULL.

PR fortran/77460
* simplify.c (simplify_transformation_to_scalar):  On error, result
may be NULL, simply return.


2016-09-29  Steven G. Kargl  

Backport from trunk

PR fortran/77420
* gfortran.dg/pr77420_1.f90: New test.
* gfortran.dg/pr77420_2.f90: Ditto.
* gfortran.dg/pr77420_3.f90: New test. Requires ...
* gfortran.dg/pr77420_4.f90: this file.

PR fortran/77460
* gfortran.dg/pr77460.f90: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77420_1.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77420_2.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77420_3.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77420_4.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77460.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/simplify.c
branches/gcc-5-branch/gcc/fortran/trans-common.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug target/27077] [x86, 4.1] builtin strlen poor performance

2016-09-29 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=27077

Thomas Koenig  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #12 from Thomas Koenig  ---
No test case, resolving as INVALID.

[Bug fortran/77507] gfortran rejects keyworded calls to procedures from intrinsic modules

2016-09-29 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77507

--- Comment #7 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Sep 29 20:32:22 2016
New Revision: 240636

URL: https://gcc.gnu.org/viewcvs?rev=240636=gcc=rev
Log:
2016-09-29  Steven G. Kargl  

Backport from trunk
PR fortran/77506
* array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
appear in an array constructor.

PR fortran/77507
* intrinsic.c (add_functions):  Use correct keyword.

2016-09-29  Steven G. Kargl  

Backport from trunk
PR fortran/77507
* ieee/ieee_arithmetic.F90 (IEEE_VALUE_4,IEEE_VALUE_8,IEEE_VALULE_10,
IEEE_VALUE_16):  Use correct keyword.

2016-09-29  Steven G. Kargl  

Backport from trunk
PR fortran/77506
* gfortran.dg/pr77506.f90: New test.

PR fortran/77507
* gfortran.dg/pr77507.f90: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/ieee/pr77507.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77506.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/array.c
branches/gcc-5-branch/gcc/fortran/intrinsic.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/c_assoc_2.f03
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/c_assoc_4.f90
branches/gcc-5-branch/libgfortran/ChangeLog
branches/gcc-5-branch/libgfortran/ieee/ieee_arithmetic.F90

[Bug fortran/77506] F2008 Standard does not allow CHARACTER(LEN=*) in array constructor

2016-09-29 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77506

--- Comment #5 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Sep 29 20:32:22 2016
New Revision: 240636

URL: https://gcc.gnu.org/viewcvs?rev=240636=gcc=rev
Log:
2016-09-29  Steven G. Kargl  

Backport from trunk
PR fortran/77506
* array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
appear in an array constructor.

PR fortran/77507
* intrinsic.c (add_functions):  Use correct keyword.

2016-09-29  Steven G. Kargl  

Backport from trunk
PR fortran/77507
* ieee/ieee_arithmetic.F90 (IEEE_VALUE_4,IEEE_VALUE_8,IEEE_VALULE_10,
IEEE_VALUE_16):  Use correct keyword.

2016-09-29  Steven G. Kargl  

Backport from trunk
PR fortran/77506
* gfortran.dg/pr77506.f90: New test.

PR fortran/77507
* gfortran.dg/pr77507.f90: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/ieee/pr77507.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77506.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/array.c
branches/gcc-5-branch/gcc/fortran/intrinsic.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/c_assoc_2.f03
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/c_assoc_4.f90
branches/gcc-5-branch/libgfortran/ChangeLog
branches/gcc-5-branch/libgfortran/ieee/ieee_arithmetic.F90

[Bug c++/67200] Copy elision and implicit move in return performed in cases not allowed by standard

2016-09-29 Thread rs2740 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67200

TC  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from TC  ---
Appears to be fixed in GCC 6, presumably by the delayed folding changes:

main.cpp: In function 'A f()':
main.cpp:9:23: error: use of deleted function 'A::A(const A&)'
 return true ? a : a;
   ^
main.cpp:3:5: note: declared here
 A(const A&) = delete;
 ^

[Bug fortran/71067] [4.9/5/6/7 Regression] ICE on data initialization with insufficient value

2016-09-29 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71067

--- Comment #11 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Sep 29 19:34:59 2016
New Revision: 240635

URL: https://gcc.gnu.org/viewcvs?rev=240635=gcc=rev
Log:
2016-09-29  Steven G. Kargl  

Backport from trunk
PR fortran/71067
* decl.c (match_data_constant): On error, set 'result' to NULL.

PR fortran/77260
* gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
for unused variable if symbol is entry point.

2016-09-29  Steven G. Kargl  

Backport from trunk
PR fortran/71067
* gfortran.dg/pr71067_1.f90: New test.
* gfortran.dg/pr71067_2.f90: Ditto.

PR fortran/77260
* gfortran.dg/pr77260_1.f90: New test.
* gfortran.dg/pr77260_2.f90: Ditto.

Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr71067_1.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr71067_2.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77260_1.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77260_2.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/decl.c
branches/gcc-5-branch/gcc/fortran/trans-decl.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug fortran/77260] bogus warning with ENTRY in a function

2016-09-29 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77260

--- Comment #4 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Sep 29 19:34:59 2016
New Revision: 240635

URL: https://gcc.gnu.org/viewcvs?rev=240635=gcc=rev
Log:
2016-09-29  Steven G. Kargl  

Backport from trunk
PR fortran/71067
* decl.c (match_data_constant): On error, set 'result' to NULL.

PR fortran/77260
* gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
for unused variable if symbol is entry point.

2016-09-29  Steven G. Kargl  

Backport from trunk
PR fortran/71067
* gfortran.dg/pr71067_1.f90: New test.
* gfortran.dg/pr71067_2.f90: Ditto.

PR fortran/77260
* gfortran.dg/pr77260_1.f90: New test.
* gfortran.dg/pr77260_2.f90: Ditto.

Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr71067_1.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr71067_2.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77260_1.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr77260_2.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/decl.c
branches/gcc-5-branch/gcc/fortran/trans-decl.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug target/77756] __get_cpuid() returns wrong values for level 7 (extended features)

2016-09-29 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77756

--- Comment #11 from uros at gcc dot gnu.org ---
Author: uros
Date: Thu Sep 29 18:44:32 2016
New Revision: 240629

URL: https://gcc.gnu.org/viewcvs?rev=240629=gcc=rev
Log:
PR target/77756
* config/i386/cpuid.h (__get_cpuid_count): New.
(__get_cpuid): Rename __level to __leaf.

testsuite/ChangeLog:

PR target/77756
* gcc.target/i386/pr77756.c: New test.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/cpuid.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/pr77756.c

[Bug bootstrap/57438] bootstrap fails on x86_64 darwin in stage2 linking cc1

2016-09-29 Thread greenc at fnal dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57438

Chris Green  changed:

   What|Removed |Added

 CC||greenc at fnal dot gov

--- Comment #28 from Chris Green  ---
For those people still running into this (problem still exists with GCC 6.2),
the following workaround will do the job on OS X / Mac OS: simply add this
definition to your compile commands:

-D__builtin_unreachable=__builtin_trap

[Bug fortran/69514] ICE with nested array constructor

2016-09-29 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69514

--- Comment #9 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Thu Sep 29 18:35:49 2016
New Revision: 240628

URL: https://gcc.gnu.org/viewcvs?rev=240628=gcc=rev
Log:
2016-09-29  Steven G. Kargl  

Backport from trunk
PR fortran/69514
* array.c (gfc_match_array_constructor):  If type-spec is present,
walk the array constructor performing possible conversions for 
numeric types.

2016-09-29  Steven G. Kargl  
Louis Krupp  

Backport from trunk
PR fortran/69514
* gfortran.dg/pr69514_1.f90: New test.
* gfortran.dg/pr69514_2.f90: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr69514_1.f90
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr69514_2.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/array.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug c++/77797] Unable to use constexpr function as constexpr template parameter

2016-09-29 Thread slavanap at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77797

--- Comment #2 from Vyacheslav  ---
Then why there's no such info at GCC 4.9 news page?
https://gcc.gnu.org/gcc-4.9/
I would not submit the bug if I knew that the version was abandoned.
Please fix.

[Bug fortran/77707] [5/6/7 Regression] formatted direct access: nextrec off by one

2016-09-29 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77707

Jerry DeLisle  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jvdelisle at gcc dot 
gnu.org

--- Comment #7 from Jerry DeLisle  ---
Fixed on six, one more to go

[Bug fortran/77707] [5/6/7 Regression] formatted direct access: nextrec off by one

2016-09-29 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77707

--- Comment #6 from Jerry DeLisle  ---
Author: jvdelisle
Date: Thu Sep 29 18:08:05 2016
New Revision: 240627

URL: https://gcc.gnu.org/viewcvs?rev=240627=gcc=rev
Log:
2016-09-29  Jerry DeLisle  

Backport from trunk
PR libgfortran/77707
io/transfer.c (next_record): Flush before calculating next_record.
Correctly calculate.

* gfortran.dg/inquire_17.f90: New test.

Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/inquire_17.f90
Modified:
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/libgfortran/ChangeLog
branches/gcc-6-branch/libgfortran/io/transfer.c

[Bug c++/77797] Unable to use constexpr function as constexpr template parameter

2016-09-29 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77797

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||trippels at gcc dot gnu.org
 Resolution|--- |WONTFIX

--- Comment #1 from Markus Trippelsdorf  ---
gcc-4.9 is no longer maintained.

[Bug c++/77797] New: Unable to use constexpr function as constexpr template parameter

2016-09-29 Thread slavanap at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77797

Bug ID: 77797
   Summary: Unable to use constexpr function as constexpr template
parameter
   Product: gcc
   Version: 4.9.3
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: slavanap at yandex dot ru
  Target Milestone: ---

Created attachment 39725
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39725=edit
test case that represents and describes the bug

Code in attachment does compile with g++ 5.1.0, but does not with 4.9.3. Here
you can try that online http://melpon.org/wandbox/permlink/hGFy7IEnCycvgvLr

In short, constexpr function as a template parameter with conjunction of
parameter pack expansion does not work with g++ 4.9.3.

Full sample code in the attachment.

Please compile it with
g++ sample.cpp -Wall -Wextra -std=c++11

Note, `(defined _MSC_VER && _MSC_VER < 1900) || (!defined _MSC_VER &&
__cplusplus <= 201103L)` condition will resolve to `true`, because of
`-std=c++11` g++ option.

[Bug target/77756] __get_cpuid() returns wrong values for level 7 (extended features)

2016-09-29 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77756

--- Comment #10 from H.J. Lu  ---
(In reply to Uroš Bizjak from comment #9)
> At the end of the day, it looks that we want simply an additional version of
> __get_cpuid where sub-leaf can be specified - a variant of HJ's proposal:
> 
> --cut here--
> /* Return cpuid data for requested cpuid leaf, as found in returned
>eax, ebx, ecx and edx registers.  The function checks if cpuid is
>supported and returns 1 for valid cpuid information or 0 for
>unsupported cpuid leaf.  All pointers are required to be non-null.  */
> 
> static __inline int
> __get_cpuid (unsigned int __leaf,
>unsigned int *__eax, unsigned int *__ebx,
>unsigned int *__ecx, unsigned int *__edx)
> {
>   unsigned int __ext = __leaf & 0x8000;
> 
>   if (__get_cpuid_max (__ext, 0) < __leaf)
> return 0;
> 
>   __cpuid (__leaf, *__eax, *__ebx, *__ecx, *__edx);
>   return 1;
> }
> 
> /* Same as above, but sub-leaf can be specified.  */
> 
> static __inline int
> __get_cpuid_count (unsigned int __leaf, unsigned int __subleaf,
>  unsigned int *__eax, unsigned int *__ebx,
>  unsigned int *__ecx, unsigned int *__edx)
> {
>   unsigned int __ext = __leaf & 0x8000;
> 
>   if (__get_cpuid_max (__ext, 0) < __leaf)
> return 0;
> 
>   __cpuid_count (__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
>   return 1;
> }
> --cut here--

It looks good to me.

[Bug target/77756] __get_cpuid() returns wrong values for level 7 (extended features)

2016-09-29 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77756

--- Comment #9 from Uroš Bizjak  ---
At the end of the day, it looks that we want simply an additional version of
__get_cpuid where sub-leaf can be specified - a variant of HJ's proposal:

--cut here--
/* Return cpuid data for requested cpuid leaf, as found in returned
   eax, ebx, ecx and edx registers.  The function checks if cpuid is
   supported and returns 1 for valid cpuid information or 0 for
   unsupported cpuid leaf.  All pointers are required to be non-null.  */

static __inline int
__get_cpuid (unsigned int __leaf,
 unsigned int *__eax, unsigned int *__ebx,
 unsigned int *__ecx, unsigned int *__edx)
{
  unsigned int __ext = __leaf & 0x8000;

  if (__get_cpuid_max (__ext, 0) < __leaf)
return 0;

  __cpuid (__leaf, *__eax, *__ebx, *__ecx, *__edx);
  return 1;
}

/* Same as above, but sub-leaf can be specified.  */

static __inline int
__get_cpuid_count (unsigned int __leaf, unsigned int __subleaf,
   unsigned int *__eax, unsigned int *__ebx,
   unsigned int *__ecx, unsigned int *__edx)
{
  unsigned int __ext = __leaf & 0x8000;

  if (__get_cpuid_max (__ext, 0) < __leaf)
return 0;

  __cpuid_count (__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
  return 1;
}
--cut here--

[Bug target/77300] [MIPS] incorrectly moves instruction containing local GOT16 relocation into a delay slot

2016-09-29 Thread james410 at cowgill dot org.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77300

James Cowgill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |MOVED

--- Comment #5 from James Cowgill  ---
Moved here:
https://sourceware.org/bugzilla/show_bug.cgi?id=20649

It seems I can close the bug so doing it now.

[Bug ada/77793] ICE on "&" operator from Ada.Containers.Vectors with expression functions

2016-09-29 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77793

Eric Botcazou  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 CC||ebotcazou at gcc dot gnu.org
Summary|GNAT Bug Box when using the |ICE on "&" operator from
   |"&" operator from   |Ada.Containers.Vectors with
   |Ada.Containers.Vectors on   |expression functions
   |inline uses of expression   |
   |functions   |
 Ever confirmed|0   |1
  Known to fail||4.9.4, 5.4.1, 6.2.1, 7.0

--- Comment #2 from Eric Botcazou  ---
Present in all versions.

[Bug sanitizer/77538] segmentation fault: thread sanitizer shadow stack overflow

2016-09-29 Thread coollpe at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77538

--- Comment #7 from peien luo  ---
tried, still got D state, build with gcc 4.9.4

[god@localhost 21586]$ cat stack
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] retint_signal+0x48/0x8c
[] 0x
[god@localhost 21586]$ cat status
Name:   test_metaserver
State:  D (disk sleep)
Tgid:   21586
Ngid:   0
Pid:21586
PPid:   12499
TracerPid:  0
Uid:1000100010001000
Gid:1000100010001000
FDSize: 256
Groups: 1000 
VmPeak: 104153806860 kB
VmSize: 104153793252 kB
VmLck: 0 kB
VmPin: 0 kB
VmHWM:342544 kB
VmRSS:342544 kB
VmData: 104153254936 kB
VmStk:  1048 kB
VmExe: 18392 kB
VmLib:  5992 kB
VmPTE:  1904 kB
VmSwap:0 kB
Threads:8
SigQ:   0/63365
SigPnd: 
ShdPnd: 
SigBlk: 
SigIgn: 1000
SigCgt: 00018000
CapInh: 
CapPrm: 
CapEff: 
CapBnd: 001f
Seccomp:0
Cpus_allowed:   ,,,
Cpus_allowed_list:  0-127
Mems_allowed:  
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0001
Mems_allowed_list:  0
voluntary_ctxt_switches:442
nonvoluntary_ctxt_switches: 9

[god@localhost 21586]$ cat task/*/stack
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] retint_signal+0x48/0x8c
[] 0x
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x
[] pipe_wait+0x70/0xc0
[] pipe_write+0x236/0x5b0
[] do_sync_write+0x8d/0xd0
[] dump_write+0x52/0x70
[] dump_seek+0xa4/0xe0
[] elf_core_dump+0x896/0x950
[] do_coredump+0x882/0xb10
[] get_signal_to_deliver+0x1c7/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x

[god@localhost 21586]$ cat task/*/stack
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] retint_signal+0x48/0x8c
[] 0x
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x
[] do_exit+0x1e4/0xa60
[] do_group_exit+0x3f/0xa0
[] get_signal_to_deliver+0x1d0/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x
[] pipe_wait+0x70/0xc0
[] pipe_write+0x236/0x5b0
[] do_sync_write+0x8d/0xd0
[] dump_write+0x52/0x70
[] dump_seek+0xa4/0xe0
[] elf_core_dump+0x896/0x950
[] do_coredump+0x882/0xb10
[] get_signal_to_deliver+0x1c7/0x6d0
[] do_signal+0x57/0x6c0
[] do_notify_resume+0x5f/0xb0
[] int_signal+0x12/0x17
[] 0x

[god@localhost ~]$ g++ -v
Using 

[Bug target/77756] __get_cpuid() returns wrong values for level 7 (extended features)

2016-09-29 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77756

--- Comment #8 from Uroš Bizjak  ---
(In reply to H.J. Lu from comment #7)
> Level 7 returns the maximum input value in EAX with ECX == 0.
> Level 9 and 10 don't use ECX as input.
> Level 11 takes ECX[7:0] as input level number.
> Level 13 takes many values in ECX as input.
> 
> 
> There is no fixed rule of ECX input for level >= 7.

Thanks for clarifying - so, we should have simply:

static __inline int
__get_cpuid_subleaf (unsigned int __level, unsigned int __subleaf,
 unsigned int *__eax, unsigned int *__ebx,
 unsigned int *__ecx, unsigned int *__edx)
{
  unsigned int __ext = __level & 0x8000;

  if (__get_cpuid_max (__ext, 0) < __level)
return 0;

  if (__ext)
__cpuid (__level, *__eax, *__ebx, *__ecx, *__edx);
  else if (__level >= 7)
__cpuid_count (__level, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
  else
__cpuid (__level, *__eax, *__ebx, *__ecx, *__edx);

  return 1;
}

[Bug target/77300] [MIPS] incorrectly moves instruction containing local GOT16 relocation into a delay slot

2016-09-29 Thread ma...@linux-mips.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77300

--- Comment #4 from Maciej W. Rozycki  ---
Thanks.  I didn't expect -W would be required for non-truncated output,
however at this stage it looks anyway like it's GAS which is at fault,
because the GOT16 relocation at 0xcc isn't reordered (in the relocation
table) ahead the LO16 relocation at 0x60.

Could you therefore please file a bug against GAS at
 and attach the generated assembly
which has triggered this problem?  I'll take it from there.

This bug can now be closed although I can't seem able to do that for
some reason.  NB it would be good to have links both ways recorded
between the bug entries, so please record a link here once you've got
the other bug's ID.

[Bug target/77756] __get_cpuid() returns wrong values for level 7 (extended features)

2016-09-29 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77756

--- Comment #7 from H.J. Lu  ---
Level 7 returns the maximum input value in EAX with ECX == 0.
Level 9 and 10 don't use ECX as input.
Level 11 takes ECX[7:0] as input level number.
Level 13 takes many values in ECX as input.


There is no fixed rule of ECX input for level >= 7.

[Bug bootstrap/77788] profiledbootstrap failures on powerpc64le

2016-09-29 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77788

--- Comment #3 from Martin Sebor  ---
It seems that few of us do profiledbootstrap during development so warnings
tend to creep in and go unnoticed.  Would it make sense to detect the missing
--disable-werror during configuration and print a big warning that such builds
are unsupported and will likely fail?  (It might help avoid wasting time.)

[Bug c++/70932] flexible array member with non-trivial destructor

2016-09-29 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70932

--- Comment #9 from Martin Sebor  ---
Sorry, I haven't gotten to it yet.

[Bug fortran/77764] ICE in is_anonymous_component, at fortran/interface.c:450

2016-09-29 Thread fritzoreese at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77764

Fritz Reese  changed:

   What|Removed |Added

 CC||fritzoreese at gmail dot com

--- Comment #2 from Fritz Reese  ---
https://gcc.gnu.org/ml/fortran/2016-09/msg00190.html

Patch submitted

[Bug fortran/77782] ICE in gfc_get_union_type, at fortran/trans-types.c:2387

2016-09-29 Thread fritzoreese at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77782

--- Comment #2 from Fritz Reese  ---
https://gcc.gnu.org/ml/fortran/2016-09/msg00189.html

Patch submitted

[Bug c++/77796] New: tautological compare warning emitted for inherited static method comparisons

2016-09-29 Thread linux at carewolf dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77796

Bug ID: 77796
   Summary: tautological compare warning emitted for inherited
static method comparisons
   Product: gcc
   Version: 6.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: linux at carewolf dot com
  Target Milestone: ---

We have been running into several issues with the tautological compare warning
in qtdeclarative, first there was https://bugreports.qt.io/browse/QTBUG-53373
(warning about comparing a typedef with its definition), and recently
https://bugreports.qt.io/browse/QTBUG-56266 (warning about a method that is
resolved to what it is compared to).

Both cases the comparison are not tautological, but merely compile time, and
specifically used in places where they need to be resolvable at compile time.
It makes no sense to warn about a comparison being resolvable at compile time a
place that demands a constexpr.

The latest example can be reproduced with this simple code:
class A {
public:
static void destroy() { }
};

class B : public A
{
};

const int tbl[1] = {
B::destroy == A::destroy ? 0 : 1
};

It specifically looks for whether the method has been overwritten in a derived
class, but since the names are looked up using two different scopes, it
shouldn't trigger the taulogical warning. Only comparing (A::destroy ==
A::destroy) should do that.

[Bug libstdc++/77794] [5/6/7 Regression] libstdc++ doesn't bootstrap with ./configure --enable-symvers=gnu-versioned-namespace

2016-09-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77794

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |5.5

[Bug libstdc++/77795] [6/7 Regression] ::gets declared in C++14 mode

2016-09-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77795

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |6.3

[Bug bootstrap/77768] [7 Regression] LTO/PGO -O3 bootstrap broken: tree-vrp.c:11053:0: internal compiler error: Segmentation fault

2016-09-29 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77768

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from Markus Trippelsdorf  ---
Finally fixed. Thanks.

[Bug libstdc++/77794] [5/6/7 Regression] libstdc++ doesn't bootstrap with ./configure --enable-symvers=gnu-versioned-namespace

2016-09-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77794

Jonathan Wakely  changed:

   What|Removed |Added

 Target|x86_64-gnu-linux|
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
   Host|x86_64-gnu-linux|
Summary|libstdc++ doesn't bootstrap |[5/6/7 Regression]
   |with ./cofnigure|libstdc++ doesn't bootstrap
   |--enable-symvers=gnu-versio |with ./configure
   |ned-namespace   |--enable-symvers=gnu-versio
   ||ned-namespace
 Ever confirmed|0   |1
  Known to fail||5.4.1
  Build|x86_64-gnu-linux|

[Bug tree-optimization/77745] [5/6 Regression] Inconsistent application of aliasing rules

2016-09-29 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77745
Bug 77745 depends on bug 77768, which changed state.

Bug 77768 Summary: [7 Regression] LTO/PGO -O3 bootstrap broken: 
tree-vrp.c:11053:0: internal compiler error: Segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77768

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

[Bug bootstrap/77788] profiledbootstrap failures on powerpc64le

2016-09-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77788

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 Ever confirmed|0   |1

--- Comment #2 from Martin Liška  ---
Just for completeness, there's a list of profiledbootstrap warnings seen on
x86_64-linux-gnu (w/o -Wimplicit-fallthrough):

../../../boehm-gc/os_dep.c:2766:26: warning: assignment from incompatible
pointer type [-Wincompatible-pointer-types]
../../gcc/combine.c:1310:8: warning: ‘prev’ may be used uninitialized in this
function [-Wmaybe-uninitialized]
../../gcc/expmed.h:622:77: warning: array subscript is above array bounds
[-Warray-bounds]
../../gcc/gimple-ssa-strength-reduction.c:1583:28: warning: ‘c’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
../../gcc/tree-ssa-ccp.c:2852:4: warning: ‘op0’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
../../gcc/tree-ssa-ccp.c:2853:21: warning: ‘op1’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
../../gcc/varasm.c:1572:1: warning: ‘%.5u’ directive writing between 5 and 10
bytes into a region of size 9 [-Wformat-length=]
../../gcc/varasm.c:1595:1: warning: ‘%.5u’ directive writing between 5 and 10
bytes into a region of size 9 [-Wformat-length=]
gengtype-lex.c:1352:18: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
gengtype-lex.c:1352:18: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
gengtype-lex.c:1352:18: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
gengtype-lex.c:1352:18: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
gengtype-lex.c:1352:18: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
gengtype-lex.c:1352:18: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
gengtype-lex.c:2694:17: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
gengtype-lex.c:2694:17: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
gengtype-lex.c:2694:17: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
gengtype-lex.c:2694:17: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
gengtype-lex.c:2694:17: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
gengtype-lex.c:2694:17: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
../../../../libgfortran/caf/single.c:1840:29: warning: ‘src_size’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
../../../libgfortran/caf/single.c:1840:29: warning: ‘src_size’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
../../../../libgfortran/caf/single.c:2629:29: warning: ‘src_size’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
../../../libgfortran/caf/single.c:2629:29: warning: ‘src_size’ may be used
uninitialized in this function [-Wmaybe-uninitialized]
../../../../libgfortran/intrinsics/date_and_time.c:169:47: warning: ‘%03d’
directive output may be truncated writing between 3 and 8 bytes into a region
of size 4 [-Wformat-length=]
../../../../libgfortran/intrinsics/date_and_time.c:173:33: warning: ‘%+03d’
directive output may be truncated writing between 3 and 9 bytes into a region
of size 6 [-Wformat-length=]
../../../libgfortran/intrinsics/date_and_time.c:173:33: warning: ‘%+03d’
directive output may be truncated writing between 3 and 9 bytes into a region
of size 6 [-Wformat-length=]

As I talked to Jakub, we used to have working profiledbootstrap w/o
--disable-werror. I can spend some time fixing these issues after stage1
finishes.

[Bug c++/77792] Generic lamdba scope issue when working with list::remove_if

2016-09-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77792

--- Comment #3 from Jonathan Wakely  ---
The minimal example from an SO answer:

template
struct S {
  template static void f();
  S() { void(*g)(char) = [](auto) { f<0>; }; }
};
S<0> s;

[Bug tree-optimization/77677] [7 Regression] ICE at -O1 and above in both 32-bit and 64-bit modes on x86_64-linux-gnu (internal compiler error: in set_value_range, at tree-vrp.c:361)

2016-09-29 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77677

Martin Jambor  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #13 from Martin Jambor  ---
So if I understand this correctly, this bug is fixed, right?

[Bug c++/77792] Generic lamdba scope issue when working with list::remove_if

2016-09-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77792

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 Ever confirmed|0   |1

--- Comment #2 from Jonathan Wakely  ---
Reduced:

template
void remove_if(Pred pred) {
pred(1);
}

template
struct S {
template 
static void f() { } 

void run() {
remove_if([](auto) { ; }); // (2)
}
};

int main() {
S s;
s.run();
}

[Bug bootstrap/77768] [7 Regression] LTO/PGO -O3 bootstrap broken: tree-vrp.c:11053:0: internal compiler error: Segmentation fault

2016-09-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77768

--- Comment #11 from Richard Biener  ---
Author: rguenth
Date: Thu Sep 29 12:31:02 2016
New Revision: 240617

URL: https://gcc.gnu.org/viewcvs?rev=240617=gcc=rev
Log:
2016-09-29  Richard Biener  

PR tree-optimization/77768
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
Handle stores to readonly memory when removing redundant stores.

* gcc.dg/torture/pr77768.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr77768.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-pre.c

[Bug c++/77775] [7 Regression] since r238559 Kdevelop gets miscompiled

2016-09-29 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=5

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 Ever confirmed|0   |1

--- Comment #4 from Markus Trippelsdorf  ---
markus@x4 tmp % cat moc.ii
namespace Sublime {
struct View;
struct AreaIndex;
struct Area {
  void qt_static_metacall();
  void viewAdded(AreaIndex *, View *);
};
}
void Sublime::Area::qt_static_metacall() {
  typedef void (Area::*_t)(AreaIndex *, View *);
  if (*reinterpret_cast<_t *>(1) == _t(::viewAdded))
__builtin_abort();
}

gcc-6 -O3:

Sublime::Area::qt_static_metacall():
cmpqSublime::Area::viewAdded(Sublime::AreaIndex*, Sublime::View*),
1
je  .L7
.L1:
rep ret
.L7:
cmpq$0, 9
jne .L1
subq$8, %rsp
callabort

trunk -O3:

Sublime::Area::qt_static_metacall():
cmpq$0, 1
je  .L7
rep ret
.L7:
subq$8, %rsp
callabort

[Bug middle-end/77407] Optimize integer i / abs (i) into the sign of i

2016-09-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77407

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Thu Sep 29 12:28:19 2016
New Revision: 240616

URL: https://gcc.gnu.org/viewcvs?rev=240616=gcc=rev
Log:
2016-09-29  Richard Biener  

PR middle-end/77407
* match.pd: Add X / abs (X) -> X < 0 ? -1 : 1 and
X / -X -> -1 simplifications.

* gcc.dg/pr77407.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/pr77407.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog

[Bug middle-end/77407] Optimize integer i / abs (i) into the sign of i

2016-09-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77407

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |7.0

--- Comment #2 from Richard Biener  ---
Fixed.

[Bug middle-end/55152] MAX_EXPR(a,-a) is really ABS_EXPR(a)

2016-09-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55152

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |7.0

--- Comment #8 from Richard Biener  ---
Fixed.

[Bug middle-end/55152] MAX_EXPR(a,-a) is really ABS_EXPR(a)

2016-09-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55152

--- Comment #7 from Richard Biener  ---
Author: rguenth
Date: Thu Sep 29 12:27:19 2016
New Revision: 240615

URL: https://gcc.gnu.org/viewcvs?rev=240615=gcc=rev
Log:
2016-09-29  Richard Biener  

PR middle-end/55152
* match.pd: Add max(a,-a) -> abs(a) pattern.
* tree-ssa-phiopt.c (minmax_replacement): Disable for
HONOR_SIGNED_ZEROS types.

* gcc.dg/pr55152.c: New testcase.
* gcc.dg/tree-ssa/phi-opt-5.c: Adjust.

Added:
trunk/gcc/testsuite/gcc.dg/pr55152.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-5.c
trunk/gcc/tree-ssa-phiopt.c

[Bug c++/77792] Generic lamdba scope issue when working with list::remove_if

2016-09-29 Thread michele.caini at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77792

--- Comment #1 from Michele Caini  ---
See also this question on SO: http://stackoverflow.com/q/39766467/4987285

[Bug c/77767] [5/6/7 Regression] Side-effect from VLA array parameters lost

2016-09-29 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77767

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

--- Comment #3 from Marek Polacek  ---
Mine.

[Bug c/77767] [5/6/7 Regression] Side-effect from VLA array parameters lost

2016-09-29 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77767

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Marek Polacek  ---
Confirmed.

[Bug tree-optimization/61056] strchr (x, 0) is not converted to strlen (x)

2016-09-29 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61056

--- Comment #5 from Oleg Endo  ---
https://gcc.gnu.org/viewcvs/gcc?view=revision=240568

[Bug fortran/77785] ICE in gfc_get_caf_token_offset, at fortran/trans-expr.c:1990

2016-09-29 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77785

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |vehre at gcc dot gnu.org

--- Comment #2 from vehre at gcc dot gnu.org ---
With the patch at:

https://gcc.gnu.org/ml/fortran/2016-09/msg00188.html

this ICE does not occur anymore.

[Bug fortran/71952] [Coarray, F2008] Rejects valid coarray access with array partref

2016-09-29 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71952

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from vehre at gcc dot gnu.org ---
No regressions reported so far. Closing.

[Bug c++/77791] ICE on invalid C++11 code with redefined function parameter: tree check: expected tree that contains ‘decl minimal’ structure, have ‘error_mark’ in cp_parser_lambda_declarator_opt, at

2016-09-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77791

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1
  Known to fail||4.7.0

--- Comment #1 from Martin Liška  ---
Confirmed, however it fails for releases from 4.7.0 with:

pr77791.cpp:1:29: error: redefinition of ‘int i’
pr77791.cpp:1:18: error: ‘int i’ previously declared here
pr77791.cpp:1:29: internal compiler error: tree check: expected tree that
contains ‘decl minimal’ structure, have ‘error_mark’ in
cp_parser_lambda_declarator_opt, at cp/parser.c:8364

[Bug c++/77790] ICE on valid C++14 code when compiling with "-std=c++11": in push_access_scope, at cp/pt.c:227

2016-09-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77790

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 CC||marxin at gcc dot gnu.org
  Known to work||4.8.5
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed.

[Bug c++/77786] [5 Regression] ICE in tsubst_copy, at cp/pt.c:13040

2016-09-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77786

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
  Known to work||4.9.4, 6.2.0, 7.0
   Keywords||ice-on-valid-code
   Last reconfirmed||2016-09-29
 CC||jason at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
 Ever confirmed|0   |1
Summary|internal compiler error: in |[5 Regression] ICE in
   |tsubst_copy, at |tsubst_copy, at
   |cp/pt.c:13040   |cp/pt.c:13040
   Target Milestone|--- |5.5
  Known to fail||4.5.4, 4.6.4, 4.7.4, 4.8.5,
   ||5.4.0

--- Comment #2 from Martin Liška  ---
I can confirm that. On trunk the issue was fixed by r231863.
It's probably up to Jason whether to backport the fix?

[Bug fortran/77785] ICE in gfc_get_caf_token_offset, at fortran/trans-expr.c:1990

2016-09-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77785

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 CC||marxin at gcc dot gnu.org,
   ||vehre at gcc dot gnu.org
   Target Milestone|--- |7.0
 Ever confirmed|0   |1
  Known to fail||7.0

--- Comment #1 from Martin Liška  ---
Started with r240231.

[Bug fortran/77783] ICE in gfc_compare_union_types, at fortran/interface.c:545

2016-09-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77783

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1
  Known to fail||6.2.0, 7.0

--- Comment #2 from Martin Liška  ---
Confirmed, started with r235999.

[Bug fortran/77782] ICE in gfc_get_union_type, at fortran/trans-types.c:2387

2016-09-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77782

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 CC||fritzoreese at gmail dot com,
   ||marxin at gcc dot gnu.org
 Ever confirmed|0   |1
  Known to fail||7.0

--- Comment #1 from Martin Liška  ---
Confirmed, started with r239819.

[Bug c++/77771] internal compiler error: in cxx_eval_bit_field_ref, at cp/constexpr.c:2090

2016-09-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=1

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1
  Known to fail||4.7.4, 4.8.5, 4.9.4, 5.4.0,
   ||6.2.0

--- Comment #1 from Martin Liška  ---
Confirmed.

[Bug libstdc++/77795] New: [6/7 Regression] ::gets declared in C++14 mode

2016-09-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77795

Bug ID: 77795
   Summary: [6/7 Regression] ::gets declared in C++14 mode
   Product: gcc
   Version: 6.2.1
Status: UNCONFIRMED
  Keywords: rejects-valid
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: redi at gcc dot gnu.org
  Target Milestone: ---
Target: *-*-gnu-linux

This is a valid C++14 program that is rejected since 6.1:

int gets;
#include 

And this should not compile, but is accepted since 6.1:

#include 
using ::gets;

Since we switched the default to -std=gnu++14 the configure checks for ::gets
find it is missing from glibc, so we don't define _GLIBCXX_HAVE_GETS, and then
in  we do:

#ifndef _GLIBCXX_HAVE_GETS
extern "C" char* gets (char* __s) __attribute__((__deprecated__));
#endif

The configure check should use -std=gnu++98 or -std=gnu++11 (so we correctly
detect the presence of ::gets when it's needed) and the declaration should only
be done for C++98 and C++11 (so we only add it when it's needed).

[Bug libstdc++/77795] [6/7 Regression] ::gets declared in C++14 mode

2016-09-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77795

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-09-29
  Known to work||5.4.0
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
 Ever confirmed|0   |1
  Known to fail||6.2.0, 7.0

[Bug c++/70932] flexible array member with non-trivial destructor

2016-09-29 Thread tripiana at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70932

Carlos Tripiana Montes  changed:

   What|Removed |Added

 CC||tripiana at gmail dot com

--- Comment #8 from Carlos Tripiana Montes  ---
(In reply to Paul Wankadia from comment #7)
> Ahh. Thank you for clarifying. I will continue to watch this bug then. :)

Any updates on this??

[Bug fortran/77765] ICE in gfc_match_oacc_routine, at fortran/openmp.c:1781

2016-09-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77765

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code,
   ||openacc
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1
  Known to fail||5.4.0, 6.2.0, 7.0

--- Comment #1 from Martin Liška  ---
Confirmed. On trunk, it started to fail with r231081.

[Bug libstdc++/77794] New: libstdc++ doesn't bootstrap with ./cofnigure --enable-symvers=gnu-versioned-namespace

2016-09-29 Thread pawel_sikora at zoho dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77794

Bug ID: 77794
   Summary: libstdc++ doesn't bootstrap with ./cofnigure
--enable-symvers=gnu-versioned-namespace
   Product: gcc
   Version: 6.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pawel_sikora at zoho dot com
  Target Milestone: ---

Created attachment 39724
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39724=edit
buildlog

hi, the recent 6.2-svn bootstrap fails on libstdc++. compressed buildlog
attached.

[Bug target/77300] [MIPS] incorrectly moves instruction containing local GOT16 relocation into a delay slot

2016-09-29 Thread james410 at cowgill dot org.uk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77300

--- Comment #3 from James Cowgill  ---
$ mipsel-linux-gnu-readelf -r src.o

Relocation section '.rel.text' at offset 0x584 contains 6 entries:
 Offset InfoTypeSym.Value  Sym. Name
  1005 R_MIPS_HI16      _gp_disp
0004  1006 R_MIPS_LO16      _gp_disp
0010  170b R_MIPS_CALL16    _ZN1GC1Ei
0028  1725 R_MIPS_JALR      _ZN1GC1Ei
0038  130b R_MIPS_CALL16    _ZN1HIiE5m_fn5ERK1G
003c  1325 R_MIPS_JALR      _ZN1HIiE5m_fn5ERK1G

Relocation section '.rel.pdr' at offset 0x5b4 contains 3 entries:
 Offset InfoTypeSym.Value  Sym. Name
  0702 R_MIPS_32    _ZN1HIiE5m_fn4ERK1G.is
0020  1302 R_MIPS_32    _ZN1HIiE5m_fn5ERK1G
0040  1802 R_MIPS_32    _Z3fn1v

Relocation section '.rel.text._ZN1HIiE5m_fn4ERK1G.isra.1' at offset 0x5cc
contains 6 entries:
 Offset InfoTypeSym.Value  Sym. Name
  1005 R_MIPS_HI16      _gp_disp
0004  1006 R_MIPS_LO16      _gp_disp
0010  110b R_MIPS_CALL16    _ZN1DC1EP1C
0030  1125 R_MIPS_JALR      _ZN1DC1EP1C
0044  120b R_MIPS_CALL16    _ZN1HIiE5m_fn3EP1C
0048  1225 R_MIPS_JALR      _ZN1HIiE5m_fn3EP1C

Relocation section '.rel.text._ZN1HIiE5m_fn5ERK1G' at offset 0x5fc contains 18
entries:
 Offset InfoTypeSym.Value  Sym. Name
  1005 R_MIPS_HI16      _gp_disp
0004  1006 R_MIPS_LO16      _gp_disp
0010  140b R_MIPS_CALL16    _ZN1HIiE5m_fn2Ev
0028  1425 R_MIPS_JALR      _ZN1HIiE5m_fn2Ev
0038  150b R_MIPS_CALL16    _ZN1HIiE5m_fn1Ev
003c  1525 R_MIPS_JALR      _ZN1HIiE5m_fn1Ev
0048  160b R_MIPS_CALL16    _ZN1HIiE5m_fn6Ev
004c  1625 R_MIPS_JALR      _ZN1HIiE5m_fn6Ev
005c  0709 R_MIPS_GOT16     _ZN1HIiE5m_fn4ERK1G.is
0060  0706 R_MIPS_LO16      _ZN1HIiE5m_fn4ERK1G.is
0068  0725 R_MIPS_JALR      _ZN1HIiE5m_fn4ERK1G.is
0074  0725 R_MIPS_JALR      _ZN1HIiE5m_fn4ERK1G.is
0094  170b R_MIPS_CALL16    _ZN1GC1Ei
009c  1725 R_MIPS_JALR      _ZN1GC1Ei
00b0  150b R_MIPS_CALL16    _ZN1HIiE5m_fn1Ev
00b4  1525 R_MIPS_JALR      _ZN1HIiE5m_fn1Ev
00cc  0709 R_MIPS_GOT16     _ZN1HIiE5m_fn4ERK1G.is
00d4  150b R_MIPS_CALL16    _ZN1HIiE5m_fn1Ev

Relocation section '.rel.eh_frame' at offset 0x68c contains 3 entries:
 Offset InfoTypeSym.Value  Sym. Name
001c  0602 R_MIPS_32    .text._ZN1HIiE5m_fn4ER
0054  0802 R_MIPS_32    .text._ZN1HIiE5m_fn5ER
0090  0202 R_MIPS_32    .text

$ mipsel-linux-gnu-gcc -fuse-ld=bfd src.o
[... omitted irrelevant undefined references]
/usr/lib/gcc-cross/mipsel-linux-gnu/6/../../../../mipsel-linux-gnu/bin/ld.bfd:
src.o: Can't find matching LO16 reloc against `_ZN1HIiE5m_fn4ERK1G.isra.1' for
R_MIPS_GOT16 at 0xcc in section
`.text._ZN1HIiE5m_fn5ERK1G[_ZN1HIiE5m_fn5ERK1G]'
[...]

$ mipsel-linux-gnu-gcc -fuse-ld=gold src.o 
/usr/lib/gcc-cross/mipsel-linux-gnu/6/../../../../mipsel-linux-gnu/bin/ld.gold:
error: Can't find matching LO16 reloc
/usr/lib/gcc-cross/mipsel-linux-gnu/6/../../../../mipsel-linux-gnu/bin/ld.gold:
error: Can't find matching LO16 reloc
/usr/lib/gcc-cross/mipsel-linux-gnu/6/../../../../mipsel-linux-gnu/bin/ld.gold:
error: Can't find matching LO16 reloc
/usr/lib/gcc-cross/mipsel-linux-gnu/6/../../../../mipsel-linux-gnu/bin/ld.gold:
error: Can't find matching LO16 reloc
[...]

[Bug target/77300] [MIPS] incorrectly moves instruction containing local GOT16 relocation into a delay slot

2016-09-29 Thread ma...@linux-mips.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77300

Maciej W. Rozycki  changed:

   What|Removed |Added

 CC||ma...@linux-mips.org

--- Comment #2 from Maciej W. Rozycki  ---
Thank you for your bug report.

The SVR4 MIPS psABI (o32) mandates that a HI16 or a local GOT16
relocation is immediately followed by a matching LO16 relocation.  To
address the very scenario described here however as a GNU extension we
support an arbitrary number of HI16 or GOT16 relocations followed by a
matching LO16 relocation.  This is explicitly noted in BFD sources:

  "The ABI requires that the *LO16 immediately follow the *HI16.
   However, as a GNU extension, we permit an arbitrary number of
   *HI16s to be associated with a single *LO16.  This significantly
   simplies the relocation handling in gcc."

and has been like this since forever.  The pairing is supposed to be
done by the assembler so as long it has been done correctly there's
nothing for the linker to complain about.

I see in the Debian bug report referred that this error only happens
with `gold', so I am highly suspicious that this is a `gold' bug.  To
ensure all is in order would you therefore please send me the output of
`readelf -r src.o' and double-check your results with both `ld' and
`gold'?

[Bug fortran/77763] ICE in parse_struct_map, at fortran/parse.c:3064

2016-09-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77763

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 CC||marxin at gcc dot gnu.org
   Target Milestone|--- |6.3
 Ever confirmed|0   |1
  Known to fail||6.2.0, 7.0

--- Comment #2 from Martin Liška  ---
Started with r235999.

[Bug ada/77793] GNAT Bug Box when using the "&" operator from Ada.Containers.Vectors on inline uses of expression functions

2016-09-29 Thread lars.schulna at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77793

--- Comment #1 from Lars Schulna  ---
Using record types is mandatory as well.

[Bug ada/77793] New: GNAT Bug Box when using the "&" operator from Ada.Containers.Vectors on inline uses of expression functions

2016-09-29 Thread lars.schulna at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77793

Bug ID: 77793
   Summary: GNAT Bug Box when using the "&" operator from
Ada.Containers.Vectors on inline uses of expression
functions
   Product: gcc
   Version: 6.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
  Assignee: unassigned at gcc dot gnu.org
  Reporter: lars.schulna at gmail dot com
  Target Milestone: ---

Created attachment 39723
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39723=edit
Source file triggering the bug box

Compiling the attached file bug.adb with
> gcc -v -save-temps -gnatd.n -c bug.adb

Triggers the following bug box:

Using built-in specs.
COLLECT_GCC=gcc
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc-multilib/src/gcc/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu
--enable-gnu-indirect-function --enable-multilib --disable-werror
--enable-checking=release
Thread model: posix
gcc version 6.2.1 20160830 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-gnatd.n' '-c' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/gnat1 -quiet -dumpbase bug.adb -auxbase
bug -gnatd.n -mtune=generic -march=x86-64 bug.adb -o bug.s
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/system.ads
bug.adb
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/ada.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/a-contai.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/a-convec.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/a-iteint.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/a-conhel.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/a-finali.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-finroo.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-atocou.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/a-stream.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/a-tags.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-stoele.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-stalib.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/a-unccon.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-exctab.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-soflin.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/a-except.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-parame.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-traent.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-stache.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-addima.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-conca2.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-stopoo.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-stratt.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-unstyp.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-secsta.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-stposu.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-finmas.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/a-convec.adb
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/a-cgarso.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/a-uncdea.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/a-conhel.adb
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-stoele.adb
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-stalib.adb
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-memory.ads
/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/adainclude/s-atocou.adb
+===GNAT BUG DETECTED==+
| 6.2.1 20160830 (x86_64-pc-linux-gnu) GCC error:  |
| in gnat_to_gnu_entity, at ada/gcc-interface/decl.c:376   |
| Error detected at bug.adb:23:20  |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.|
| Use a subject line meaningful to you and us to track the bug.|
| Include the entire contents of this bug box in the report.   |
| Include the exact command that you entered.  |
| Also include sources listed below.   |
+==+

Note that the inline use of the function expression, the vector package and the
record types are necessary to trigger the box.
Normal function declarations, 

[Bug c++/77792] New: Generic lamdba scope issue when working with list::remove_if

2016-09-29 Thread michele.caini at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77792

Bug ID: 77792
   Summary: Generic lamdba scope issue when working with
list::remove_if
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: michele.caini at gmail dot com
  Target Milestone: ---

Consider the following code:

#include
#include

template
struct S {
using FT = void(*)(); 
struct T { FT func; };

template 
static void f() { } 

std::list l{ {  }, {  } };

void run() {
l.remove_if([](const T ) { return t.func == ; }); // (1)
l.remove_if([](const auto ) { return t.func == ; }); //
(2)
}
};

int main() { 
S s;
s.run();
}

(1) compiles fine, (2) doesn't compile with the error:

> error: 'f' was not declared in this scope

Note also that it compiles if modified as it follows:

l.remove_if([](const auto ) { return t.func == ::f; }); // (2)

[Bug target/77756] __get_cpuid() returns wrong values for level 7 (extended features)

2016-09-29 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77756

--- Comment #6 from Uroš Bizjak  ---
(In reply to H.J. Lu from comment #5)
> For level >= 7, ECX may have other input values.  It is incorrect to
> assume that ECX only takes 0 or 1.  We should get another macro for
> level >= 7 with input for ECX:

We can extend __get_cpuid to assume subleaf = 0 and introduce new
__get_cpuid_subleaf, in effect:

--cut here--
static __inline int
__get_cpuid (unsigned int __level,
 unsigned int *__eax, unsigned int *__ebx,
 unsigned int *__ecx, unsigned int *__edx)
{
  unsigned int __ext = __level & 0x8000;

  if (__get_cpuid_max (__ext, 0) < __level)
return 0;

  if (__ext)
__cpuid (__level, *__eax, *__ebx, *__ecx, *__edx);
  else if (__level >= 7)
__cpuid_count (__level, 0, *__eax, *__ebx, *__ecx, *__edx);
  else
__cpuid (__level, *__eax, *__ebx, *__ecx, *__edx);

  return 1;
}

static __inline int
__get_cpuid_subleaf (unsigned int __level, unsigned int __subleaf,
 unsigned int *__eax, unsigned int *__ebx,
 unsigned int *__ecx, unsigned int *__edx)
{
  unsigned int __ext = __level & 0x8000;

  if (__get_cpuid_max (__ext, 0) < __level)
return 0;

  if (__ext)
__cpuid (__level, *__eax, *__ebx, *__ecx, *__edx);
  else if (__level >= 7)
{
  __cpuid_count (__level, 0, *__eax, *__ebx, *__ecx, *__edx);
  if (__subleaf > *__eax)
return 0;
  if (__subleaf)
__cpuid_count (__level, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
}
  else
__cpuid (__level, *__eax, *__ebx, *__ecx, *__edx);

  return 1;
}
--cut here--

Please note that the above __get_cpuid_subleaf also checks return value from
subleaf = 0 and fails if requested subleaf is out of allowed range.

[Bug c++/66297] [C++14] [DR 1684] constexpr non-static member functions of non-literal types

2016-09-29 Thread mati865 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66297

--- Comment #1 from mati865 at gmail dot com ---
Still affects GCC 6.2.

[Bug middle-end/77779] unnecessary trap checks for pointer subtraction with -ftrapv

2016-09-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=9

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-29
 Ever confirmed|0   |1
  Known to fail||5.4.0, 6.2.0

--- Comment #1 from Richard Biener  ---
Same with GCC 6.  On trunk we get

diff:
.LFB0:
.cfi_startproc
subq$8, %rsp
.cfi_def_cfa_offset 16
call__subvdi3
sarq$3, %rax
movl$2, %esi
movq%rax, %rdi
call__mulvdi3
addq$8, %rsp
.cfi_def_cfa_offset 8
ret

because we "optimize" (canonicalize) the add to a multiplication by two.

I believe the DImode overflow minus is spurious because of the way we
represent pointer subtraction:

  a.0_1 = (long int) a_5(D);
  b.1_2 = (long int) b_6(D);
  _3 = a.0_1 - b.1_2;
  _4 = _3 /[ex] 8;

thus a - b isn't distinguishable from ((long)a - (long)b) / 8.

Anyway, confirmed.  The "fix" is to make trapping ops explicit by using
the existing builtins / internal-fns from the frontends that (want to)
implement -ftrapv.  There's a separate bug about this as well.

[Bug bootstrap/77788] profiledbootstrap failures on powerpc64le

2016-09-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77788

Richard Biener  changed:

   What|Removed |Added

   Keywords||diagnostic

--- Comment #1 from Richard Biener  ---
I believe you usually need to use --disable-werror for non-standard bootstraps
like with FDO or LTO.

[Bug libstdc++/77459] [6/7 Regression] undefined reference to `snprintf' when building mingw-w64 cross-compiler

2016-09-29 Thread gk at torproject dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77459

--- Comment #5 from Georg Koppen  ---
No, it is still broken after applying the patch to 6.2.0:

../src/c++11/.libs/libc++11convenience.a(debug.o): In function
`format_word':
/home/ubuntu/build/gcc/i686-w64-mingw32/libstdc++-v3/src/c++11/../../../../gcc-6.2.0/libstdc++-v3/src/c++11/debug.cc:536:
undefined reference to `snprintf'
/home/ubuntu/build/gcc/i686-w64-mingw32/libstdc++-v3/src/c++11/../../../../gcc-6.2.0/libstdc++-v3/src/c++11/debug.cc:536:
undefined reference to `snprintf'
/home/ubuntu/build/gcc/i686-w64-mingw32/libstdc++-v3/src/c++11/../../../../gcc-6.2.0/libstdc++-v3/src/c++11/debug.cc:536:
undefined reference to `snprintf'
collect2: error: ld returned 1 exit status

[Bug bootstrap/77768] [7 Regression] LTO/PGO -O3 bootstrap broken: tree-vrp.c:11053:0: internal compiler error: Segmentation fault

2016-09-29 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77768

--- Comment #10 from rguenther at suse dot de  ---
On Thu, 29 Sep 2016, trippels at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77768
> 
> --- Comment #8 from Markus Trippelsdorf  ---
> Looks like tree-ssa-pre.c also needs to be guarded:
> 
> 0x10c3a273 crash_signal
> ../../gcc/gcc/toplev.c:337
> 0x10f30e2c eliminate_dom_walker::before_dom_children(basic_block_def*)
> ../../gcc/gcc/tree-ssa-pre.c:4448
> 0x11807427 dom_walker::walk(basic_block_def*)
> ../../gcc/gcc/domwalk.c:265
> 0x10f2a9a7 eliminate
> ../../gcc/gcc/tree-ssa-pre.c:4709
> 0x10f3e31f execute
> ../../gcc/gcc/tree-ssa-pre.c:5055
> 
> 
> diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
> index 3675fb9..cc008c2 100644
> --- a/gcc/tree-ssa-pre.c
> +++ b/gcc/tree-ssa-pre.c
> @@ -4445,8 +4445,8 @@ eliminate_dom_walker::before_dom_children (basic_block 
> b)
>   /* We can only remove the later store if the former aliases
>  at least all accesses the later one does.  */
>   alias_set_type set = get_alias_set (lhs);
> - if (vnresult->set == set
> - || alias_set_subset_of (set, vnresult->set))
> + if (vnresult && (vnresult->set == set
> + || alias_set_subset_of (set, vnresult->set)))
> {
>   if (dump_file && (dump_flags & TDF_DETAILS))
> {

I'm testing ! vnresult || vnresult->set == ... instead, we can remove
stores to readonly memory if it stores the same value as present.

Richard.

[Bug c/77789] MinGW option ./configure does not make

2016-09-29 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77789

Andreas Schwab  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |MOVED

--- Comment #1 from Andreas Schwab  ---
You should report that to the maintainers of the gsl libraries.  Btw, there are
no errors in the build log.

[Bug bootstrap/77768] [7 Regression] LTO/PGO -O3 bootstrap broken: tree-vrp.c:11053:0: internal compiler error: Segmentation fault

2016-09-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77768

--- Comment #9 from Richard Biener  ---
Author: rguenth
Date: Thu Sep 29 07:15:13 2016
New Revision: 240610

URL: https://gcc.gnu.org/viewcvs?rev=240610=gcc=rev
Log:
2016-09-29  Richard Biener  

PR tree-optimization/77768
* tree-ssa-sccvn.c (visit_reference_op_store): Properly deal
with stores to a place we know has a constant value.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-sccvn.c

[Bug bootstrap/77768] [7 Regression] LTO/PGO -O3 bootstrap broken: tree-vrp.c:11053:0: internal compiler error: Segmentation fault

2016-09-29 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77768

--- Comment #8 from Markus Trippelsdorf  ---
Looks like tree-ssa-pre.c also needs to be guarded:

0x10c3a273 crash_signal
../../gcc/gcc/toplev.c:337
0x10f30e2c eliminate_dom_walker::before_dom_children(basic_block_def*)
../../gcc/gcc/tree-ssa-pre.c:4448
0x11807427 dom_walker::walk(basic_block_def*)
../../gcc/gcc/domwalk.c:265
0x10f2a9a7 eliminate
../../gcc/gcc/tree-ssa-pre.c:4709
0x10f3e31f execute
../../gcc/gcc/tree-ssa-pre.c:5055


diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c
index 3675fb9..cc008c2 100644
--- a/gcc/tree-ssa-pre.c
+++ b/gcc/tree-ssa-pre.c
@@ -4445,8 +4445,8 @@ eliminate_dom_walker::before_dom_children (basic_block b)
  /* We can only remove the later store if the former aliases
 at least all accesses the later one does.  */
  alias_set_type set = get_alias_set (lhs);
- if (vnresult->set == set
- || alias_set_subset_of (set, vnresult->set))
+ if (vnresult && (vnresult->set == set
+ || alias_set_subset_of (set, vnresult->set)))
{
  if (dump_file && (dump_flags & TDF_DETAILS))
{