[Bug libstdc++/77641] std::variant copy-initialization fails for type with non-trivial constexpr ctor

2016-09-21 Thread timshen at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77641

--- Comment #4 from Tim Shen  ---
Author: timshen
Date: Thu Sep 22 03:15:58 2016
New Revision: 240340

URL: https://gcc.gnu.org/viewcvs?rev=240340=gcc=rev
Log:
PR libstdc++/77641
* include/std/variant (_Variant_storage::_Variant_storage):
Change _Variant_storage's union to be default constructible.
* testsuite/20_util/variant/compile.cc: New test.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/variant
trunk/libstdc++-v3/testsuite/20_util/variant/compile.cc

[Bug c/77675] optimization level==number of -Wformat-length warnings

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

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-09-22
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Sebor  ---
The output with the latest patch
(https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01477.html) I see the warnings
below, but only with -Wformat-length=2.

If I understand correctly, you're wondering if (or implying that) there should
be just one warning in each compiler invocation, regardless of the optimization
level.  It seems reasonable in this case but I confess I don't know if it's
possible.  The pass relies on optimization for constant propagation and value
range propagation, and those in turn depend on inlining.  With more function
calls inlined it's possible for the same sprintf call to be duplicated in more
callers and result in more warnings than otherwise.  Maybe there's a way to set
TREE_NO_WARNING for the call statement after it has been diagnosed.  Let me
look into it.

 (set -x; for o in 0 1 2 3; do /build/gcc-77676/gcc/xgcc -B
/build/gcc-77676/gcc -O$o -S -Wformat-length=2  ~/tmp/algapi.i; done)
+ for o in 0 1 2 3
+ /build/gcc-77676/gcc/xgcc -B /build/gcc-77676/gcc -O0 -S -Wformat-length=2
/home/msebor/tmp/algapi.i
crypto/algapi.c: In function ‘crypto_inst_setname’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-length=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64
+ for o in 0 1 2 3
+ /build/gcc-77676/gcc/xgcc -B /build/gcc-77676/gcc -O1 -S -Wformat-length=2
/home/msebor/tmp/algapi.i
crypto/algapi.c: In function ‘crypto_inst_setname’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-length=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64
+ for o in 0 1 2 3
+ /build/gcc-77676/gcc/xgcc -B /build/gcc-77676/gcc -O2 -S -Wformat-length=2
/home/msebor/tmp/algapi.i
crypto/algapi.c: In function ‘crypto_inst_setname’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-length=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64
crypto/algapi.c: In function ‘crypto_alloc_instance2’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-length=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64
+ for o in 0 1 2 3
+ /build/gcc-77676/gcc/xgcc -B /build/gcc-77676/gcc -O3 -S -Wformat-length=2
/home/msebor/tmp/algapi.i
crypto/algapi.c: In function ‘crypto_inst_setname’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-length=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64
crypto/algapi.c: In function ‘crypto_alloc_instance2’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-length=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64
crypto/algapi.c: In function ‘crypto_alloc_instance’:
crypto/algapi.c:817:6: warning: ‘%s’ directive output may be truncated writing
between 1 and 63 bytes into a region of size 62 [-Wformat-length=]
crypto/algapi.c:817:6: note: format output between 5 and 67 bytes into a
destination of size 64

[Bug sanitizer/65643] FAIL: c-c++-common/asan/swapcontext-test-1.c on powerpc64

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

Martin Sebor  changed:

   What|Removed |Added

 Target|powerpc64*-*-linux-*|powerpc64-*-linux-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed|2016-01-25 00:00:00 |2016-09-22
 Ever confirmed|0   |1
  Known to fail||7.0

--- Comment #3 from Martin Sebor  ---
The failures still show up in powerpc64 test results:

trunk revision 240293
  https://gcc.gnu.org/ml/gcc-testresults/2016-09/msg01992.html

gcc-6-branch revision 240322:
  https://gcc.gnu.org/ml/gcc-testresults/2016-09/msg02046.html

gcc-5-branch revision 240328:
  https://gcc.gnu.org/ml/gcc-testresults/2016-09/msg02055.html

They do not seem to affect powerpc64le (either on trunk or on the branches) so
I've adjusted the Target specification.

[Bug target/61367] Annoying rtx cost information in middle end dumps on arm/aarch64 targets

2016-09-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61367

Andrew Pinski  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org

--- Comment #2 from Andrew Pinski  ---
I am going to implement an option to the aarch64 backend next week for this.

[Bug debug/60433] auto-fn24.C:7:8: ICE: in dbxout_type, at dbxout.c:2371

2016-09-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60433

--- Comment #3 from Andrew Pinski  ---
Does this work now?

[Bug sanitizer/65643] FAIL: c-c++-common/asan/swapcontext-test-1.c on powerpc64

2016-09-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65643

--- Comment #2 from Andrew Pinski  ---
Does this work now?

[Bug target/77685] New: rs6000 target has builtin expansion for memcpy but not memcmp

2016-09-21 Thread acsawdey at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77685

Bug ID: 77685
   Summary: rs6000 target has builtin expansion for memcpy but not
memcmp
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: acsawdey at gcc dot gnu.org
  Reporter: acsawdey at gcc dot gnu.org
CC: wschmidt at gcc dot gnu.org
  Target Milestone: ---
Target: rs6000 powerpc64

The rs6000 target needs a cmpmemsi pattern and supporting code generation so it
can inline expand memcmp().

[Bug tree-optimization/61839] More optimize opportunity for VRP

2016-09-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61839

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug target/61837] missed loop invariant expression optimization

2016-09-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61837

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug middle-end/77683] [7.0 regression] ICE on %lf directive in format_floating in gimple-ssa-sprintf.c:1163

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

Martin Sebor  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
Summary|ICE on %lf directive in |[7.0 regression] ICE on %lf
   |format_floating in  |directive in
   |gimple-ssa-sprintf.c:1163   |format_floating in
   ||gimple-ssa-sprintf.c:1163

--- Comment #1 from Martin Sebor  ---
Patch posted for review:
https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01470.html

[Bug target/77676] powerpc64 and powerpc64le stage2 bootstrap fail

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

--- Comment #11 from Martin Sebor  ---
A sightly modified version of the attached patch has been posted for review:
https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01475.html

[Bug middle-end/77682] GCC crashes while compiling OpenAL-Soft 1.17.2

2016-09-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77682

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2016-09-21
  Component|c   |middle-end
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Can you provide the preprocessed source?

[Bug target/77670] PowerPC64 Spec 2006 fails on 453.povray using -mcpu=power9 -mpower9-minmax

2016-09-21 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77670

--- Comment #3 from Michael Meissner  ---
Author: meissner
Date: Wed Sep 21 22:12:13 2016
New Revision: 240336

URL: https://gcc.gnu.org/viewcvs?rev=240336=gcc=rev
Log:
2016-09-21  Michael Meissner  

PR target/77670
* config/rs6000/predicates.md (invert_fpmask_comparison_operator):
New predicate that matches the ISA 3.0 XSCMP{EQ,GT,GE}DP
instructions when you want to invert the test.
* config/rs6000/rs6000.md (fpmask): Use the arguments in the
correct order for XXSEL.
(movcc_invert_p9): Define the inverted test
for using XSCMP{EQ,GT,GE}DP.


Modified:
trunk/gcc/ChangeLog

[Bug target/77670] PowerPC64 Spec 2006 fails on 453.povray using -mcpu=power9 -mpower9-minmax

2016-09-21 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77670

--- Comment #2 from Michael Meissner  ---
Author: meissner
Date: Wed Sep 21 22:11:42 2016
New Revision: 240335

URL: https://gcc.gnu.org/viewcvs?rev=240335=gcc=rev
Log:
2016-09-21  Michael Meissner  

PR target/77670
* config/rs6000/predicates.md (invert_fpmask_comparison_operator):
New predicate that matches the ISA 3.0 XSCMP{EQ,GT,GE}DP
instructions when you want to invert the test.
* config/rs6000/rs6000.md (fpmask): Use the arguments in the
correct order for XXSEL.
(movcc_invert_p9): Define the inverted test
for using XSCMP{EQ,GT,GE}DP.


Modified:
trunk/gcc/config/rs6000/predicates.md
trunk/gcc/config/rs6000/rs6000.md

[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-21 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77677

Zhendong Su  changed:

   What|Removed |Added

 CC||su at cs dot ucdavis.edu

--- Comment #2 from Zhendong Su  ---
Here is another test that triggers the same ICE: 

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160921 (experimental) [trunk revision 240310] (GCC)
$
$ gcc-trunk -Os small.c
small.c:15:1: internal compiler error: in set_value_range, at tree-vrp.c:361
 }
 ^
0xe70f86 set_value_range
../../gcc-source-trunk/gcc/tree-vrp.c:360
0xe738f7 vrp_meet_1
../../gcc-source-trunk/gcc/tree-vrp.c:8639
0xe738f7 vrp_meet(value_range*, value_range const*)
../../gcc-source-trunk/gcc/tree-vrp.c:8716
0x13001e5 ipcp_vr_lattice::meet_with_1(value_range const*)
../../gcc-source-trunk/gcc/ipa-cp.c:987
0x1305e54 ipcp_vr_lattice::meet_with(value_range const*)
../../gcc-source-trunk/gcc/ipa-cp.c:969
0x1305e54 propagate_vr_accross_jump_function
../../gcc-source-trunk/gcc/ipa-cp.c:2072
0x1305e54 propagate_constants_accross_call
../../gcc-source-trunk/gcc/ipa-cp.c:2435
0x1307990 propagate_constants_topo
../../gcc-source-trunk/gcc/ipa-cp.c:3329
0x1307990 ipcp_propagate_stage
../../gcc-source-trunk/gcc/ipa-cp.c:3439
0x1309f03 ipcp_driver
../../gcc-source-trunk/gcc/ipa-cp.c:5246
0x1309f03 execute
../../gcc-source-trunk/gcc/ipa-cp.c:5342
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$
$ cat small.c
int a, b;

static void fn1 (short p1)
{ 
  a = -p1;
  if (a || b)
__builtin_printf ("%d\n", b);
}

int main ()
{ 
  int c[] = { 4 };
  fn1 (c[0]);
  return 0;
}
$

[Bug libstdc++/77537] pair constructors do not properly SFINAE

2016-09-21 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77537

Ville Voutilainen  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
   Last reconfirmed||2016-09-21
 Resolution|FIXED   |---
 Ever confirmed|0   |1

--- Comment #6 from Ville Voutilainen  ---
Reopen for tracking the backport.

[Bug libstdc++/77537] pair constructors do not properly SFINAE

2016-09-21 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77537

Ville Voutilainen  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |ville.voutilainen at 
gmail dot com

--- Comment #7 from Ville Voutilainen  ---
And mine, again.

[Bug libstdc++/77537] pair constructors do not properly SFINAE

2016-09-21 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77537

--- Comment #5 from Ville Voutilainen  ---
There's a fairly decent chance, sure. :) I'll cook up a patch.

[Bug libstdc++/77537] pair constructors do not properly SFINAE

2016-09-21 Thread Casey at Carter dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77537

--- Comment #4 from Casey Carter  ---
Any chance of applying this to 6-branch as well? This is breaking both range-v3
and cmcstl2 in a nasty and hard-to-workaround way.

[Bug tree-optimization/77485] Missed dead store elimination of aggregate store followed by partial stores

2016-09-21 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77485

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||law at redhat dot com

--- Comment #3 from Jeffrey A. Law  ---
Richi, I think you were referring to BZ33562.   I have a follow-up patch for
that which attacks it on the DSE side rather than in complex lowering.  The
approach in that follow-up patch has a reasonable chance of catching the case
in this BZ.

I still hope to get back to it prior to close of stage1.

[Bug testsuite/77684] New: many tree-prof testsuite failures in parallel make check

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

Bug ID: 77684
   Summary: many tree-prof testsuite failures in parallel make
check
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

As discussed in https://gcc.gnu.org/ml/gcc/2016-09/msg00107.html, there are a
number of failures in different tests in the tree-prof directory when make
check is run in parallel (e.g., with -j8)  none of which are reproducible with
-j1.  For example:

Serial make check passes:
$ make -C /build/gcc-49905 check-c RUNTESTFLAGS='tree-prof.exp'
...
=== gcc Summary ===

# of expected passes307
# of unsupported tests  48
/build/gcc-49905/gcc/xgcc  version 7.0.0 20160920 (experimental) (GCC)


Parallel make check fails a bunch of different tests each time
it's run:

$ make -C /build/gcc-49905 -j80 -k check-c RUNTESTFLAGS='tree-prof.exp' 2>&1 |
grep FAIL

FAIL: gcc.dg/tree-prof/peel-1.c execution,-g
FAIL: gcc.dg/tree-prof/update-tailcall.c execution,-g
FAIL: gcc.dg/tree-prof/cold_partition_label.c execution,-g
FAIL: gcc.dg/tree-prof/val-prof-1.c execution,-g
FAIL: gcc.dg/tree-prof/pr45354.c execution,-g
FAIL: gcc.dg/tree-prof/val-prof-2.c execution,-g
FAIL: gcc.dg/tree-prof/crossmodule-indircall-1.c execution,-g
FAIL: gcc.dg/tree-prof/crossmodule-indircall-1a.c execution,-g
FAIL: gcc.dg/tree-prof/pr52027.c execution,-g
FAIL: gcc.dg/tree-prof/20041218-1.c execution,-g

and again:

$ nice make -C /build/gcc-49905 -j80 -k check-c RUNTESTFLAGS='tree-prof.exp'
2>&1 | grep FAIL

FAIL: gcc.dg/tree-prof/bb-reorg.c execution,-g
FAIL: gcc.dg/tree-prof/prof-robust-1.c execution,-g
FAIL: gcc.dg/tree-prof/update-loopch.c execution,-g
FAIL: gcc.dg/tree-prof/crossmodule-indircall-1a.c execution,-g
FAIL: gcc.dg/tree-prof/switch-case-2.c execution,-g
FAIL: gcc.dg/tree-prof/ic-misattribution-1.c execution,-g
FAIL: gcc.dg/tree-prof/tracer-1.c execution,-g

[Bug libfortran/71363] Issue when sizeof(double) = sizeof(long double)

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

Jerry DeLisle  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #6 from Jerry DeLisle  ---
(In reply to Steve Kargl from comment #5)
> On Wed, Sep 21, 2016 at 04:25:00PM +, jvdelisle at gcc dot gnu.org wrote:
> > 
> > I will try to study the script some more later today. Changing status to
> > unconfirmed while we look into this a bit.
> > 
> 
> I closed this bug a long time ago, because the initial report
> indicated that OP was not using GCC sources.  OP is using 
> something supplied by Google for Android.  This is not a 
> gfortran problem.

Yes Steve understood. Will take this off line. I am more curious than anything
else. I have an Android tablet that I am fiddling with.

[Bug tree-optimization/53991] _mm_popcnt_u64 fails with -O3 -fgnu-tm

2016-09-21 Thread pc at us dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53991

--- Comment #11 from Paul Clarke  ---
We use TM for a multi-producer-multi-consumer queue implementation, and ran
into the issue reported in this bug.  (I had opened bug 77681 before
discovering this report.)  This report is surprisingly old.  Is there any
chance this could get bumped to higher priority?

[Bug middle-end/77683] ICE on %lf directive in format_floating in gimple-ssa-sprintf.c:1163

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

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-09-21
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
Summary|ICE on %lf directive in |ICE on %lf directive in
   |format_floating in  |format_floating in
   |/src/gcc-svn/gcc/gimple-ssa |gimple-ssa-sprintf.c:1163
   |-sprintf.c:1163 |
 Ever confirmed|0   |1
  Known to fail||7.0

[Bug c++/77681] failing to inline simple function when using -fgnu-tm

2016-09-21 Thread pc at us dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77681

Paul Clarke  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Paul Clarke  ---
I'll move over to the already-reported bug.

*** This bug has been marked as a duplicate of bug 53991 ***

[Bug tree-optimization/53991] _mm_popcnt_u64 fails with -O3 -fgnu-tm

2016-09-21 Thread pc at us dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53991

Paul Clarke  changed:

   What|Removed |Added

 CC||pc at us dot ibm.com

--- Comment #10 from Paul Clarke  ---
*** Bug 77681 has been marked as a duplicate of this bug. ***

[Bug c++/77681] failing to inline simple function when using -fgnu-tm

2016-09-21 Thread pc at us dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77681

--- Comment #1 from Paul Clarke  ---
shoot. this may be a dup of bug 53991

[Bug middle-end/49905] Better sanity checking on sprintf src & dest to produce warning for dodgy code ?

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

--- Comment #22 from Martin Sebor  ---
I've raised bug 77683 for the ICE on %lf.

[Bug middle-end/77683] New: ICE on %lf directive in format_floating in /src/gcc-svn/gcc/gimple-ssa-sprintf.c:1163

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

Bug ID: 77683
   Summary: ICE on %lf directive in format_floating in
/src/gcc-svn/gcc/gimple-ssa-sprintf.c:1163
   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: ---

The gimple-ssa-sprintf.c pass crashes on a %lf directive:

$ cat v.c && /build/gcc-trunk-svn/gcc/xgcc -B /build/gcc-trunk-svn/gcc -S -Wall
-Wformat -Wextra -Wpedantic v.c
char d [3];

void f (double x)
{
  __builtin_sprintf (d, "%lf", x);
}
v.c: In function ‘f’:
v.c:3:6: internal compiler error: in format_floating, at
gimple-ssa-sprintf.c:1163
 void f (double x)
  ^
0x181ba7e format_floating
/src/gcc-svn/gcc/gimple-ssa-sprintf.c:1163
0x181c8b2 format_floating
/src/gcc-svn/gcc/gimple-ssa-sprintf.c:1373
0x181d144 format_directive
/src/gcc-svn/gcc/gimple-ssa-sprintf.c:1626
0x181e794 compute_format_length
/src/gcc-svn/gcc/gimple-ssa-sprintf.c:2320
0x181f516 handle_gimple_call
/src/gcc-svn/gcc/gimple-ssa-sprintf.c:2645
0x181f5f1 execute
/src/gcc-svn/gcc/gimple-ssa-sprintf.c:2671
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug middle-end/49905] Better sanity checking on sprintf src & dest to produce warning for dodgy code ?

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

Martin Sebor  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

--- Comment #21 from Martin Sebor  ---
I agree that the compiler shouldn't crash on directives it doesn't expect.

The feature is implemented at this point so let's open new bugs for problems in
the implementation (with the expected information such as a test case) rather
than reopening the enhancement request.

[Bug c/77682] New: GCC crashes while compiling OpenAL-Soft 1.17.2

2016-09-21 Thread jeffbai at aosc dot xyz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77682

Bug ID: 77682
   Summary: GCC crashes while compiling OpenAL-Soft 1.17.2
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jeffbai at aosc dot xyz
  Target Milestone: ---

GCC crashed while compiling openal-soft 1.17.2:

[ 82%] Building C object CMakeFiles/bsincgen.dir/utils/bsincgen.c.o
/bin/gcc  -D_LARGEFILE_SOURCE -D_LARGE_FILES -D_POSIX_C_SOURCE=200112L
-D_XOPEN_SOURCE=500
-I/var/lib/abbs/build/tmp.cUeDFpnWuA/openal-soft-1.17.2/include
-I/var/lib/abbs/build/tmp.cUeDFpnWuA/openal-soft-1.17.2/build  -std=c11  -pipe
-Wno-error  -fstack-protector-strong --param=ssp-buffer-size=4   
-fomit-frame-pointer -O2-march=armv8-a -mtune=cortex-a53  
-fira-loop-pressure -fira-hoist-pressure -ftree-vectorize 
-specs=/usr/lib/autobuild3/specs/hardened-cc1  -O3 -DNDEBUG  
-Winline -Wall -Wextra -fvisibility=hidden -pthread -o
CMakeFiles/bsincgen.dir/utils/bsincgen.c.o   -c
/var/lib/abbs/build/tmp.cUeDFpnWuA/openal-soft-1.17.2/utils/bsincgen.c
/var/lib/abbs/build/tmp.cUeDFpnWuA/openal-soft-1.17.2/utils/bsincgen.c: In
function ‘main’:
/var/lib/abbs/build/tmp.cUeDFpnWuA/openal-soft-1.17.2/utils/bsincgen.c:160:13:
internal compiler error: Segmentation fault
 int m = 2 * (int)floor(a);
 ^
gcc: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[2]: *** [CMakeFiles/bsincgen.dir/build.make:63:
CMakeFiles/bsincgen.dir/utils/bsincgen.c.o] Error 4
make[2]: *** Deleting file 'CMakeFiles/bsincgen.dir/utils/bsincgen.c.o'
make[2]: Leaving directory
'/var/lib/abbs/build/tmp.cUeDFpnWuA/openal-soft-1.17.2/build'
make[1]: *** [CMakeFiles/Makefile2:223: CMakeFiles/bsincgen.dir/all] Error 2
make[1]: Leaving directory
'/var/lib/abbs/build/tmp.cUeDFpnWuA/openal-soft-1.17.2/build'
make: *** [Makefile:128: all] Error 2

GCC version info:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-aosc-linux-gnu/6.2.0/lto-wrapper
Target: aarch64-aosc-linux-gnu
Configured with: /var/lib/abbs/build/tmp.oCDM81AKGq/gcc-6.2.0/configure
--prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=https://github.com/AOSC-Dev/aosc-os-core
--enable-languages=c,c++,fortran,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-gnu-indirect-function
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --with-isl=/usr --enable-lto --enable-plugin
--enable-install-libiberty --disable-multilib --disable-werror --enable-pie
--enable-checking=release --with-default-libstdcxx-abi=gcc4-compatible
--build=aarch64-aosc-linux-gnu --with-linker-hash-style=gnu --disable-altivec
--disable-fixed-point --with-arch=armv8-a
Thread model: posix
gcc version 6.2.0 20160822 (AOSC OS, Core) (GCC)

openal-soft source:
http://kcat.strangesoft.net/openal-releases/openal-soft-1.17.2.tar.bz2

[Bug c/71501] missing warning on printf %s with a non-nul terminated string

2016-09-21 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71501
Bug 71501 depends on bug 49905, which changed state.

Bug 49905 Summary: Better sanity checking on sprintf src & dest to produce 
warning for dodgy code ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49905

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution|--- |FIXED

[Bug c++/77681] New: failing to inline simple function when using -fgnu-tm

2016-09-21 Thread pc at us dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77681

Bug ID: 77681
   Summary: failing to inline simple function when using -fgnu-tm
   Product: gcc
   Version: 6.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pc at us dot ibm.com
  Target Milestone: ---

Created attachment 39671
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39671=edit
testcase where always_inline fails with -fgnu-tm

I've used several different versions of GCC, including 4.8.5 and 6.2.1, on
different architectures (x86_64 and ppc64le).

I first noticed that a very simple "static inline" function was not being
inlined.  When I added "__attribute__((always_inline))", an error was produced
(see below). In narrowing down the testcase, I also tried to narrow down the
command line, and discovered that the error is only produced when "-fgnu-tm" is
present.  The narrowed-down testcase makes no use of transactional memory, so
there appears to be some inlining interference caused by "-fgnu-tm".
--
$ g++ -O3 -c always-inline.cpp -fgnu-tm -o /dev/null
always-inline.cpp: In member function ‘T* spsc::pop() [with T = int]’:
always-inline.cpp:9:1: error: inlining failed in call to always_inline ‘void*
_ZL13SPHGetFreePtrPv.constprop.0()’: 
 SPHGetFreePtr (void *H) {
 ^
always-inline.cpp:19:32: error: called from here
   T** p = (T**) SPHGetFreePtr(0);
$ g++ -O3 -c always-inline.cpp -o /dev/null
$
--

[Bug target/71395] PowerPC vec_init of 4 SFmode values could be improved on Power8

2016-09-21 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71395

--- Comment #2 from Michael Meissner  ---
Author: meissner
Date: Wed Sep 21 20:17:32 2016
New Revision: 240332

URL: https://gcc.gnu.org/viewcvs?rev=240332=gcc=rev
Log:
Add PR target/71395 marker to 71395 fix

Modified:
trunk/gcc/ChangeLog

[Bug target/71395] PowerPC vec_init of 4 SFmode values could be improved on Power8

2016-09-21 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71395

Michael Meissner  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #1 from Michael Meissner  ---
Fixed in subversion id 240272.

[Bug c/71501] missing warning on printf %s with a non-nul terminated string

2016-09-21 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71501
Bug 71501 depends on bug 49905, which changed state.

Bug 49905 Summary: Better sanity checking on sprintf src & dest to produce 
warning for dodgy code ?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49905

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

[Bug middle-end/49905] Better sanity checking on sprintf src & dest to produce warning for dodgy code ?

2016-09-21 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49905

David Binderman  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #20 from David Binderman  ---
(In reply to Martin Sebor from comment #19)
> Enhancement committed in r240298.

The current code seems to crash when given %lf specifier.

It might be better if it just ignored specifiers it doesn't know,
rather than crash. There are many (> 70) specifiers.

[Bug fortran/77680] New: ICE in ctor_for_folding, at varpool.c:419

2016-09-21 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77680

Bug ID: 77680
   Summary: ICE in ctor_for_folding, at varpool.c:419
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

Another issue with default initialization (used for testing only).
Affects versions 5, 6 and 7, at -Og, -Os, -O1 or higher.


$ cat z1.f90
program p
   bind(c) :: x
   call s(x)
end


$ /home/gst/gcc/gcc-7-20160918-oyd/bin/gfortran -O2 -finit-real=zero -c z1.f90
z1.f90:4:0:

 end

internal compiler error: in ctor_for_folding, at varpool.c:419
0xf18192 ctor_for_folding(tree_node*)
../../gcc/varpool.c:419
0xdd4842 fully_constant_vn_reference_p(vn_reference_s*)
../../gcc/tree-ssa-sccvn.c:1377
0xdd998f vn_reference_lookup(tree_node*, tree_node*, vn_lookup_kind,
vn_reference_s**, bool)
../../gcc/tree-ssa-sccvn.c:2431
0xddcec6 visit_reference_op_store
../../gcc/tree-ssa-sccvn.c:3583
0xddcec6 visit_use
../../gcc/tree-ssa-sccvn.c:3831
0xddeb6b process_scc
../../gcc/tree-ssa-sccvn.c:4073
0xddeb6b extract_and_process_scc_for_name
../../gcc/tree-ssa-sccvn.c:4160
0xddeb6b DFS
../../gcc/tree-ssa-sccvn.c:4212
0xddf3dd sccvn_dom_walker::before_dom_children(basic_block_def*)
../../gcc/tree-ssa-sccvn.c:4678
0x1299da2 dom_walker::walk(basic_block_def*)
../../gcc/domwalk.c:265
0xde01f2 run_scc_vn(vn_lookup_kind)
../../gcc/tree-ssa-sccvn.c:4789
0xdb0b54 execute
../../gcc/tree-ssa-pre.c:5126

[Bug target/77676] powerpc64 and powerpc64le stage2 bootstrap fail

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

--- Comment #10 from Martin Sebor  ---
Created attachment 39670
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39670=edit
Patch under test.

The patch should resolve all the issues discussed in this bug.  I don't have
access to Darwin so I'd appreciate your help validating it there.  The patch
doesn't enable the optimization yet.  I'm testing with it enabled and assuming
good results and no objections I'll re-enable it when I commit it.

[Bug fortran/77679] New: ICE in fold_array_ctor_reference, at gimple-fold.c:5586

2016-09-21 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77679

Bug ID: 77679
   Summary: ICE in fold_array_ctor_reference, at
gimple-fold.c:5586
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

Affects versions 6 and 7, at -Os, -O1 or higher.
Invalid code with an uninitialized variable.


$ cat z1.f90
program p
   character(1) :: x(2)
   x = [character(n(1)) :: 'a', 'b']
end


$ gfortran-7-20160918 -O0 z1.f90
z1.f90:3:0:

x = [character(n(1)) :: 'a', 'b']

Error: size of variable 'A.0' is too large


$ gfortran-7-20160918 -O2 z1.f90
z1.f90:4:0:

 end

internal compiler error: in fold_array_ctor_reference, at gimple-fold.c:5586
0x996e18 fold_array_ctor_reference
../../gcc/gimple-fold.c:5585
0x996e18 fold_ctor_reference(tree_node*, tree_node*, unsigned long, unsigned
long, tree_node*)
../../gcc/gimple-fold.c:5727
0x997055 fold_const_aggregate_ref_1(tree_node*, tree_node* (*)(tree_node*))
../../gcc/gimple-fold.c:5835
0x997eb0 gimple_fold_stmt_to_constant_1(gimple*, tree_node* (*)(tree_node*),
tree_node* (*)(tree_node*))
../../gcc/gimple-fold.c:5297
0xe114bf record_temporary_equivalences_from_stmts_at_dest
../../gcc/tree-ssa-threadedge.c:329
0xe12351 thread_through_normal_block
../../gcc/tree-ssa-threadedge.c:1049
0xe13d21 thread_across_edge(gcond*, edge_def*, bool, const_and_copies*,
avail_exprs_stack*, tree_node* (*)(gimple*, gimple*, avail_exprs_stack*))
../../gcc/tree-ssa-threadedge.c:1289
0xd44c90 dom_opt_dom_walker::thread_across_edge(edge_def*)
../../gcc/tree-ssa-dom.c:989
0xd44ea9 dom_opt_dom_walker::after_dom_children(basic_block_def*)
../../gcc/tree-ssa-dom.c:1408
0x1299c37 dom_walker::walk(basic_block_def*)
../../gcc/domwalk.c:307
0xd47988 execute
../../gcc/tree-ssa-dom.c:614

[Bug fortran/77678] ICE in fold_read_from_constant_string, at fold-const.c:13706

2016-09-21 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77678

--- Comment #1 from Gerhard Steinmetz  
---

Slightly modified :


$ cat z2.f90
program p
   character(3) :: c = 'abc'
   character(1) :: z
   integer :: i
   ! i = 2
   z = c(i:i)
   print *, z
end


$ gfortran-7-20160918 -O2 -finit-integer=-1 z2.f90
$ gfortran-7-20160918 -O2 -finit-integer=-890 z2.f90
$ gfortran-7-20160918 -O2 -finit-integer=-12345678 z2.f90
z2.f90:6:0:

z = c(i:i)

internal compiler error: Segmentation fault
0xc21a5f crash_signal
../../gcc/toplev.c:336
0x9053b7 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc/expr.c:10284
0x9077f8 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
../../gcc/expr.c:9725
0x912cf6 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
../../gcc/expr.c:5547
0x9147d7 expand_assignment(tree_node*, tree_node*, bool)
../../gcc/expr.c:5167
0x802cb6 expand_gimple_stmt_1
../../gcc/cfgexpand.c:3649
0x802cb6 expand_gimple_stmt
../../gcc/cfgexpand.c:3745
0x8050ce expand_gimple_basic_block
../../gcc/cfgexpand.c:5752
0x80b276 execute
../../gcc/cfgexpand.c:6363

[Bug fortran/77678] New: ICE in fold_read_from_constant_string, at fold-const.c:13706

2016-09-21 Thread gerhard.steinmetz.fort...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77678

Bug ID: 77678
   Summary: ICE in fold_read_from_constant_string, at
fold-const.c:13706
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

A problem with default initialization (used for testing only),
starting at a specific negative value.
For versions down to at least 4.8, at -Og, -Os, -O1 or higher.
Testcode with an uninitialized variable "i" :


$ cat z1.f90
program p
   character(1) :: z
   integer :: i
   ! i = 2
   z = 'abc'(i:i)
   print *, z
end


$ gfortran-7-20160918 -O2 -finit-integer=-1 z1.f90
$ gfortran-7-20160918 -O2 -finit-integer=-890 z1.f90
$ gfortran-7-20160918 -O2 -finit-integer=-12345678 z1.f90
z1.f90:7:0:

 end

internal compiler error: Segmentation fault
0xc21a5f crash_signal
../../gcc/toplev.c:336
0x951f1b fold_read_from_constant_string(tree_node*)
../../gcc/fold-const.c:13706
0x996f7f fold_const_aggregate_ref_1(tree_node*, tree_node* (*)(tree_node*))
../../gcc/gimple-fold.c:5754
0x9984de fold_const_aggregate_ref(tree_node*)
../../gcc/gimple-fold.c:5857
0x9984de maybe_fold_reference
../../gcc/gimple-fold.c:281
0x998999 fold_gimple_assign
../../gcc/gimple-fold.c:313
0x99ddff fold_stmt_1
../../gcc/gimple-fold.c:3901
0xdc0781 substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
../../gcc/tree-ssa-propagate.c:
0x1299da2 dom_walker::walk(basic_block_def*)
../../gcc/domwalk.c:265
0xdbfb9b substitute_and_fold(tree_node* (*)(tree_node*), bool
(*)(gimple_stmt_iterator*), bool)
../../gcc/tree-ssa-propagate.c:1211
0xd299cc ccp_finalize
../../gcc/tree-ssa-ccp.c:949
0xd299cc do_ssa_ccp
../../gcc/tree-ssa-ccp.c:2415
0xd299cc execute
../../gcc/tree-ssa-ccp.c:2458

[Bug target/77669] Incorrect LTO code on embedded ARM

2016-09-21 Thread wgh at beyondunreal dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77669

wgh at beyondunreal dot com changed:

   What|Removed |Added

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

--- Comment #4 from wgh at beyondunreal dot com ---
I've carefully analyzed the assembly code, and different constructor order was
indeed the case. Thank you for your help.

[Bug c/66008] "section type conflict" if calling a macro inlined or in a two times derived class

2016-09-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66008

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
No feedback in over 9 months so closing.

[Bug libstdc++/77288] Std::experimental::optional::operator= implementation is broken in gcc 6.1

2016-09-21 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77288

--- Comment #10 from Ville Voutilainen  ---
And yes, I plan to port this fix to experimental::optional on trunk and then
backport that.

[Bug libstdc++/77288] Std::experimental::optional::operator= implementation is broken in gcc 6.1

2016-09-21 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77288

--- Comment #9 from Ville Voutilainen  ---
Fixed on trunk so far.

[Bug libstdc++/77288] Std::experimental::optional::operator= implementation is broken in gcc 6.1

2016-09-21 Thread ville at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77288

--- Comment #8 from ville at gcc dot gnu.org ---
Author: ville
Date: Wed Sep 21 17:37:17 2016
New Revision: 240324

URL: https://gcc.gnu.org/viewcvs?rev=240324=gcc=rev
Log:
PR libstdc++/77288
* include/std/optional (__is_optional_impl, __is_optional): Remove.
(__converts_from_optional, __assigns_from_optional): New.
(optional(_Up&&)): Use is_same instead of __is_optional.
(optional(const optional<_Up>&)): Constrain with
__converts_from_optional.
(optional(optional<_Up>&&)): Likewise.
(operator=(_Up&&)): Use is_same instead of __is_optional, check
is_same and is_scalar.
(operator=(const optional<_Up>&)): Constrain with
__converts_from_optional and __assigns_from_optional.
(operator=(optional<_Up>&&)): Likewise.
* testsuite/20_util/optional/77288.cc: New.
* testsuite/20_util/optional/cons/value.cc: Adjust.

Added:
trunk/libstdc++-v3/testsuite/20_util/optional/77288.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/optional
trunk/libstdc++-v3/testsuite/20_util/optional/cons/value.cc

[Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]

2016-09-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66038

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #43 from Andrew Pinski  ---
.

[Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]

2016-09-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66038

--- Comment #42 from Andrew Pinski  ---
Closing astatement invalid then.

[Bug c/77464] gcc -no-pie breaks -shared

2016-09-21 Thread balint at balintreczey dot hu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77464

--- Comment #11 from Balint Reczey  ---
(In reply to Manuel López-Ibáñez from comment #10)
> (In reply to Andrew Pinski from comment #5)
> > (In reply to Manuel López-Ibáñez from comment #3)
> > > Or at least give a clearer error that mentions -fPIC ...
> > 
> > Actually this is not a driver issue just a binutils issue if that. Why add
> > no-pie anyways to the ldflags.
> 
> GCC controls the driver and decides what to pass to the linker.
> 
> (In reply to Andrew Pinski from comment #8)
> > Basically -no-pie says you are now doing an executable overriding the
> > previous -shared.  This is not a bug, you want -no-pie -shared.
> 
> This seems counter-intuitive to how other options work. The documentation
> says nothing about it. Then we wonder why people complain that GCC is harder
> to use/learn.

This is both counter-intuitive and inconvenient but I have to move on.
I take this a WONTFIX and continue paving the way for using
--enable-default-pie in Debian in a less pleasant way.

Thank you at least for the quick response.

[Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]

2016-09-21 Thread kumba at gentoo dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66038

--- Comment #41 from Joshua Kinard  ---
(In reply to Andrew Pinski from comment #38)
> Does this work now?

Whatever the issue on MIPS/N32 was, it's resolved by dropping -Wl,-z,now.  So
no longer an issue AFAICT.

[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-21 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77677

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-21
 CC||mpolacek at gcc dot gnu.org
   Target Milestone|--- |7.0
Summary|ICE at -O1 and above in |[7 Regression] ICE at -O1
   |both 32-bit and 64-bit  |and above in both 32-bit
   |modes on x86_64-linux-gnu   |and 64-bit modes on
   |(internal compiler error:   |x86_64-linux-gnu (internal
   |in set_value_range, at  |compiler error: in
   |tree-vrp.c:361) |set_value_range, at
   ||tree-vrp.c:361)
 Ever confirmed|0   |1

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

[Bug libstdc++/77537] pair constructors do not properly SFINAE

2016-09-21 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77537

Ville Voutilainen  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Ville Voutilainen  ---
Fixed.

[Bug libstdc++/77537] pair constructors do not properly SFINAE

2016-09-21 Thread ville at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77537

--- Comment #2 from ville at gcc dot gnu.org ---
Author: ville
Date: Wed Sep 21 16:48:35 2016
New Revision: 240322

URL: https://gcc.gnu.org/viewcvs?rev=240322=gcc=rev
Log:
PR libstdc++/77537
Implement LWG 2729 for pair.
* include/bits/stl_pair.h (_PCC): New.
(_ConstructiblePair, _ImplicitlyConvertiblePair):
Turn into static member functions of _PCC.
(_MoveConstructiblePair, _ImplicitlyMoveConvertiblePair): Likewise.
(_PCCP): New.
(pair(const _T1&, const _T2&)): Adjust.
(_PCCFP): New.
(pair(const pair<_U1, _U2>&)): Adjust.
(pair(_U1&&, const _T2&)): Likewise.
(pair(const _T1&, _U2&&)): Likewise.
(pair(_U1&&, _U2&&)): Likewise.
(pair(pair<_U1, _U2>&&)): Likewise.
(operator=(const pair&)): Make conditionally deleted.
(operator=(pair&&)): Make conditionally suppressed.
(operator=(const pair<_U1, _U2>&)): Constrain.
(operator=(pair<_U1, _U2>&&): Likewise.
* include/std/type_traits (__nonesuch): New.
* testsuite/20_util/pair/traits.cc: New.

Added:
trunk/libstdc++-v3/testsuite/20_util/pair/traits.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/stl_pair.h
trunk/libstdc++-v3/include/std/type_traits

[Bug tree-optimization/77677] New: 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-21 Thread chengniansun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77677

Bug ID: 77677
   Summary: 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)
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: chengniansun at gmail dot com
  Target Milestone: ---

If I add "int" in front of "p1", then the crash disappears.

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160921 (experimental) [trunk revision 240316] (GCC)
$
$ gcc-trunk -O3 small.c
small.c: In function ‘fn1’:
small.c:2:5: warning: type of ‘p1’ defaults to ‘int’ [-Wimplicit-int]
 int fn1(p1) { return p1 == 0 || a % p1; }
 ^~~
small.c: At top level:
small.c:7:1: internal compiler error: in set_value_range, at tree-vrp.c:361
 }
 ^
0xe61ec8 set_value_range
../../gcc-source-trunk/gcc/tree-vrp.c:360
0xe6542e vrp_meet_1
../../gcc-source-trunk/gcc/tree-vrp.c:8639
0xe6542e vrp_meet(value_range*, value_range const*)
../../gcc-source-trunk/gcc/tree-vrp.c:8716
0x12e9ef5 ipcp_vr_lattice::meet_with_1(value_range const*)
../../gcc-source-trunk/gcc/ipa-cp.c:987
0x12f038c ipcp_vr_lattice::meet_with(value_range const*)
../../gcc-source-trunk/gcc/ipa-cp.c:969
0x12f038c propagate_vr_accross_jump_function
../../gcc-source-trunk/gcc/ipa-cp.c:2077
0x12f038c propagate_constants_accross_call
../../gcc-source-trunk/gcc/ipa-cp.c:2435
0x12f2918 propagate_constants_topo
../../gcc-source-trunk/gcc/ipa-cp.c:3329
0x12f2918 ipcp_propagate_stage
../../gcc-source-trunk/gcc/ipa-cp.c:3439
0x12f4b63 ipcp_driver
../../gcc-source-trunk/gcc/ipa-cp.c:5246
0x12f4b63 execute
../../gcc-source-trunk/gcc/ipa-cp.c:5342
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$
$ cat small.c
int a, b;
int fn1(p1) { return p1 == 0 || a % p1; }

int main() {
  b = fn1(2592930443);
  return 0;
}
$

[Bug target/77676] powerpc64 and powerpc64le stage2 bootstrap fail

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

--- Comment #9 from Martin Sebor  ---
I found the problem responsible for the incorrect code generation but I have
disabled the optimization until I have a robust solution.  The ILP32 warning in
comment #6 is a separate issue.  I'm looking into it.

The warning in comment #4 looks legitimate and should be fixable by enlarging
the destination buffer to 15 bytes as suggested in the note.


[Bug libfortran/71363] Issue when sizeof(double) = sizeof(long double)

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

Jerry DeLisle  changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |---

--- Comment #4 from Jerry DeLisle  ---
(In reply to Paul Mustiere from comment #3)
---snip---
> 
> The issue being that long double = double in this case.
> 
> When kind=16 match in C is defined, there's the check:
> 16) if [ $long_double_kind -eq 10 ]; then
> 
> Could it be that kind=16 should be match to __float128,
> and the check should be $long_double_kind -neq 16?

kind=16 is float128.  So something wrong if long double = double

I will try to study the script some more later today. Changing status to
unconfirmed while we look into this a bit.

[Bug libfortran/71363] Issue when sizeof(double) = sizeof(long double)

2016-09-21 Thread sgk at troutmask dot apl.washington.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71363

--- Comment #5 from Steve Kargl  ---
On Wed, Sep 21, 2016 at 04:25:00PM +, jvdelisle at gcc dot gnu.org wrote:
> 
> I will try to study the script some more later today. Changing status to
> unconfirmed while we look into this a bit.
> 

I closed this bug a long time ago, because the initial report
indicated that OP was not using GCC sources.  OP is using 
something supplied by Google for Android.  This is not a 
gfortran problem.

[Bug target/77326] [avr] Invalid optimization omits comparison

2016-09-21 Thread matthijs at stdin dot nl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77326

--- Comment #6 from Matthijs Kooijman  ---
Thanks!

[Bug libfortran/71363] Issue when sizeof(double) = sizeof(long double)

2016-09-21 Thread paul.mustiere at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71363

--- Comment #3 from Paul Mustiere  ---
In the script:
possible_real_kinds="4 8 10 16" i.e. it tries them all

In the for loop, when it tries to compile the dummy Fortran program to check
each kind=k existance, only 4, 8 & 16 exists.

kind=4 is defined as float,
kind=8 is defined as double,
kind=16 is defined as long double.

The issue being that long double = double in this case.

When kind=16 match in C is defined, there's the check:
16) if [ $long_double_kind -eq 10 ]; then

Could it be that kind=16 should be match to __float128,
and the check should be $long_double_kind -neq 16?

[Bug target/77676] powerpc64 and powerpc64le stage2 bootstrap fail

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

--- Comment #8 from Martin Sebor  ---
Author: msebor
Date: Wed Sep 21 16:13:12 2016
New Revision: 240321

URL: https://gcc.gnu.org/viewcvs?rev=240321=gcc=rev
Log:
PR bootstrap/77676 - powerpc64 and powerpc64le stage2 bootstrap fail

* c.opt (fprintf-return-value): Temporarily initialize to zero
to unblock bootstrap failures.


Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c.opt

[Bug libfortran/71363] Issue when sizeof(double) = sizeof(long double)

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

Jerry DeLisle  changed:

   What|Removed |Added

 CC||jvdelisle at gcc dot gnu.org

--- Comment #2 from Jerry DeLisle  ---
(In reply to Paul Mustiere from comment #0)
> Hello,
> 
> I am building the GNU toolchain for Android with support for Fortran, and
> encountered an issue when targeting x86 for the runtime library.
> 
> Note: I'm using the toolchain sources provided by Google, but as far as I
> can tell the Fortran part is simply 4.9 since they are not trying to build
> with Fortran.
> 
> In intrisics/cshift0.c, I get a 'duplicate case value'
> (http://paste.ubuntu.com/16861425/). As far as I can tell:
> 
> - GFC_DTYPE_REAL_16 is defined (but not GFC_DTYPE_REAL_10), hence
> GFC_REAL_16 is defined as long double.
> - sizeof(long double) = sizeof(double) = 8, which causes the duplicate case.
> 
> I find a workaround which consists of detecting both sizes in mk-kinds-h.sh
> and checking that they are not equal before defining GFC_REAL_16. The rest
> of the toolchain compiles fine, but I am not sure it's ideal.
> Also, I'm curious as to why Fortran seems to be fine with real (kind=16) but
> C doesn't seem to be able to hold variables that big.
> 
> I know I'm not using the regular GNU toolchain but any help is appreciated.
> 
> Cheers,
> Paul Mustiere

Paul,

Look for where "for k in $possible_real_kinds" is in the mk-kinds script. Where
is $possible_real_kinds set?

[Bug fortran/48298] [F03] User-Defined Derived-Type IO (DTIO)

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

--- Comment #21 from Jerry DeLisle  ---
Created attachment 39669
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39669=edit
Revised patch for review/testing

This revised patch speeds up execution on non DTIO internal units by saving and
reusing the unit structure, avoiding memory allocations.  I am still testing.
So far it passes regression tests.

[Bug target/77676] powerpc64 and powerpc64le stage2 bootstrap fail

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

Martin Sebor  changed:

   What|Removed |Added

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

--- Comment #7 from Martin Sebor  ---
The optimization is meant to be independent of the warning.  If it isn't it's a
bug in the code.

I successfully tested the pass on powerpc64le just last week, but I did not
test it on any ILP32 targets.  Let me look into this.

In the meantime, the optimization can be disabled by initializing the
-fprintf-return-value option to 0, without disabling anything else.

[Bug sanitizer/77567] ASAN: Bugus error "alloc-dealloc-mismatch (malloc vs operator delete [])" with C++17's over-aligned types

2016-09-21 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77567

--- Comment #9 from Tobias Burnus  ---
For completeness, upstream review is at https://reviews.llvm.org/D24771

[Bug debug/72828] ICE in clone_tree_partial when compiling with -fdebug-types-section

2016-09-21 Thread jim at meyering dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72828

jim at meyering dot net changed:

   What|Removed |Added

 CC||jim at meyering dot net

--- Comment #6 from jim at meyering dot net ---
I have just confirmed that this still elicits an ICE using Monday's just-built
compiler: 

gcc version 7.0.0 20160919 (experimental) (GCC)

[Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]

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

Eric Botcazou  changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu.org

--- Comment #40 from Eric Botcazou  ---
> I believe the --disable-checking issue on ppc is still there.  Wonder if
> somebody can try on ppc-linux ... (or other archs, I believe just nobody
> uses --disable-checking)

Bootstrap with --disable-checking on 32-bit PowerPC/Linux is OK on mainline.

[Bug c++/77651] [7 Regression] c++ -Wno-aligned-new ICEs

2016-09-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77651

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Wed Sep 21 15:13:46 2016
New Revision: 240317

URL: https://gcc.gnu.org/viewcvs?rev=240317=gcc=rev
Log:
PR c++/77651
c-family/
* c.opt (Waligned-new=): Add RejectNegative.
(faligned-new=): Likewise.  Spelling fix - change
aligned_new_threshhold to aligned_new_threshold.
* c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
to aligned_new_threshold.
cp/
* init.c (build_new_1): Don't suggest to use -faligned-new if
aligned_new_threshold is non-zero.
(type_has_new_extended_alignment): Change aligned_new_threshhold
to aligned_new_threshold.
* call.c (second_parm_is_size_t, aligned_allocation_fn_p,
aligned_deallocation_fn_p, build_op_delete_call): Likewise.
* decl.c (cxx_init_decl_processing): Likewise.
testsuite/
* g++.dg/cpp1z/aligned-new6.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp1z/aligned-new6.C
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-cppbuiltin.c
trunk/gcc/c-family/c.opt
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/decl.c
trunk/gcc/cp/init.c
trunk/gcc/testsuite/ChangeLog

[Bug target/77478] Incorrect code generated with -O3, m32, -msse2 and -ffast-math

2016-09-21 Thread amonakov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77478

--- Comment #7 from Alexander Monakov  ---
Richard, I don't believe this is a dup. According to my git-bisect, this was
fixed or made latent during gcc-6 development by your patch:

https://gcc.gnu.org/ml/gcc-patches/2015-07/msg00120.html
[PATCH] Consolidate alignment folding
(this is r225310 on trunk)

How to go forward from here?

(about the alignment dumping patchlet, I think it would be nice to have this
functionality on trunk, can I help with that? is there something I'm missing
about this patch that makes it unsuitable for trunk as-is?)

[Bug sanitizer/77567] ASAN: Bugus error "alloc-dealloc-mismatch (malloc vs operator delete [])" with C++17's over-aligned types

2016-09-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77567

--- Comment #8 from Jakub Jelinek  ---
Author: jakub
Date: Wed Sep 21 14:40:30 2016
New Revision: 240316

URL: https://gcc.gnu.org/viewcvs?rev=240316=gcc=rev
Log:
PR sanitizer/77567
* asan/asan_new_delete.cc: Cherry-pick upstream r282019.

Modified:
trunk/libsanitizer/ChangeLog
trunk/libsanitizer/asan/asan_new_delete.cc

[Bug target/77326] [avr] Invalid optimization omits comparison

2016-09-21 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77326

Georg-Johann Lay  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|UNCONFIRMED |RESOLVED
 CC||gjl at gcc dot gnu.org
 Resolution|--- |FIXED
Summary|[avr] Invalid optimization  |[avr] Invalid optimization
   |using varargs and a weak|omits comparison
   |function|

--- Comment #5 from Georg-Johann Lay  ---
Fixed in 5.5 and 6.3+.

Also changed the bug title because the issue has nothing to do with varargs or
weak; these features just appened to be present in a test case demonstrating
the problem.

[Bug target/77326] [avr] Invalid optimization using varargs and a weak function

2016-09-21 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77326

--- Comment #4 from Georg-Johann Lay  ---
Author: gjl
Date: Wed Sep 21 14:11:59 2016
New Revision: 240315

URL: https://gcc.gnu.org/viewcvs?rev=240315=gcc=rev
Log:
gcc/
Backport from 2016-09-21 trunk r240306.
PR target/77326
* config/avr/avr.c (hard-reg-set.h): Move #include up in front
of rtl.h to that HARD_CONST is defined in rtl.h.
(avr_notice_update_cc) [CC_NONE]: If insn touches some regs
mentioned in cc_status, do CC_STATUS_INIT.

gcc/testsuite/
Backport from 2016-09-21 trunk r240306.
PR target/77326
* gcc.target/avr/torture/pr77326.c: New test.


Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/avr/torture/pr77326.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/avr/avr.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug target/77676] powerpc64 and powerpc64le stage2 bootstrap fail

2016-09-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77676

--- Comment #6 from Jakub Jelinek  ---
Perhaps it would be enough to just disable the pass for now (comment out in the
gate), so that the whole file isn't reverted.

It breaks i686-linux bootstrap as well, on the following testcase reduced from
vec.c:
struct A
{
  const char *a;
  int b;
  const char *c;
};
void bar (char *);

void
foo (struct A *p)
{
  char s[4096];
  const char *u = p->a;
  const char *t;
  while ((t = __builtin_strstr (u, "gcc/")))
u = t + 4;
  __builtin_sprintf (s, "%s:%i (%s)", u, p->b, p->c);
  bar (s);
}
I'm getting with -O2 -Wformat-length -m32:
vec.c: In function ‘foo’:
vec.c:17:26: warning: ‘%s’ directive writing between 0 and 4294967295 bytes
into a region of size 4096 [-Wformat-length=]
   __builtin_sprintf (s, "%s:%i (%s)", u, p->b, p->c);
  ^~
vec.c:17:3: note: format output between 6 and 4294967311 bytes into a
destination of size 4096
   __builtin_sprintf (s, "%s:%i (%s)", u, p->b, p->c);
   ^~
while no warnings at -O2 -Wformat-length -m64.

[Bug tree-optimization/77648] [5/6 Regression] Setting conversion to a integer to double to 0 3/4 through a loop

2016-09-21 Thread raynman4451 at tamu dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77648

--- Comment #10 from Raymond Fontenot  ---
Yeah I'll see what I can do about simplifying the test case.
~Raymond

[Bug target/77676] powerpc64 and powerpc64le stage2 bootstrap fail

2016-09-21 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77676

--- Comment #5 from Segher Boessenkool  ---
Could this be reverted for now please, until the bootstrap errors are fixed?

[Bug target/77676] powerpc64 and powerpc64le stage2 bootstrap fail

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

--- Comment #4 from Dominique d'Humieres  ---
> Bisect points to git commit b9833bfd, svn r240298.

It also breaks bootstrap on i386, see
https://gcc.gnu.org/ml/gcc-regression/2016-09/ and x86_64-apple-darwin15:

../../work/gcc/varasm.c: In function 'rtx_def* assemble_static_space(long long
unsigned int)':
../../work/gcc/varasm.c:2571:1: error: '%ld' directive writing between 1 and 11
bytes into a region of size 9 [-Werror=format-length=]
 assemble_static_space (unsigned HOST_WIDE_INT size)
 ^
../../work/gcc/varasm.c:2571:1: note: directive argument in the range
[-2147483648l, 2147483647l]
In file included from ./tm.h:21:0,
 from ../../work/gcc/backend.h:28,
 from ../../work/gcc/varasm.c:31:
../../work/gcc/config/darwin.h:754:53: note: format output between 5 and 15
bytes into a destination of size 12
   sprintf (LABEL, "*%s%ld", PREFIX, (long)(NUM)); \
 ^
../../work/gcc/varasm.c:2577:3: note: in expansion of macro
'ASM_GENERATE_INTERNAL_LABEL'
   ASM_GENERATE_INTERNAL_LABEL (name, "LF", const_labelno);
   ^~~

[Bug middle-end/71348] [7 Regression] FAIL: gfortran.dg/graphite/pr68279.f90

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

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Dominique d'Humieres  ---
Duplicate of pr77318.

*** This bug has been marked as a duplicate of bug 77318 ***

[Bug tree-optimization/77318] [7 regression] FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error)

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

Dominique d'Humieres  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #7 from Dominique d'Humieres  ---
*** Bug 71348 has been marked as a duplicate of this bug. ***

[Bug target/77676] powerpc64 and powerpc64le stage2 bootstrap fail

2016-09-21 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77676

--- Comment #3 from Alan Modra  ---
Bisect points to git commit b9833bfd, svn rev 240298.

[Bug target/77676] powerpc64 and powerpc64le stage2 bootstrap fail

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

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek  ---
Uh, if a warning affects code generation, then that needs to be fixed.  E.g.   
-Wwrite-strings has the same problem.

[Bug tree-optimization/77648] [5/6 Regression] Setting conversion to a integer to double to 0 3/4 through a loop

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

--- Comment #9 from Dominique d'Humieres  ---
> Contains two C testcases -- the Fortran bug is in another code path,
> a Fortran testcase suitable for the testsuite would be appreciated
> (single-file, runtime, fails without, passes with the patch). 
> Unfortunately(?) there is no way to create "fn spec" attributes in C test 
> cases.

I have tried to reduce the Fortran test case, but I did not succeeded. The bad
news is that the bug is gone if all the files are merged in one.

Raymond can you please try to reduce your test?

[Bug fortran/77657] link error with implementation of user-defined derived type input/output (UD-DTIO) in child extending abstract parent

2016-09-21 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77657

Paul Thomas  changed:

   What|Removed |Added

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

--- Comment #4 from Paul Thomas  ---
Fixed on trunk.

Thanks for the report.

Paul

[Bug tree-optimization/77550] [6/7 Regression] std::deque with -O3 has infinite std::distance

2016-09-21 Thread edlinger at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77550

--- Comment #17 from Bernd Edlinger  ---
Author: edlinger
Date: Wed Sep 21 13:03:59 2016
New Revision: 240313

URL: https://gcc.gnu.org/viewcvs?rev=240313=gcc=rev
Log:
gcc:
2016-09-21  Bernd Edlinger  

PR tree-optimization/77550
* tree-vect-stmts.c (create_array_ref): Change parameters.
(get_group_alias_ptr_type): New function.
(vectorizable_store, vectorizable_load): Use get_group_alias_ptr_type.

testsuite:
2016-09-21  Bernd Edlinger  

PR tree-optimization/77550
* g++.dg/pr77550.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/pr77550.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-stmts.c

[Bug target/77676] powerpc64 and powerpc64le stage2 bootstrap fail

2016-09-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77676

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-21
 CC||jakub at gcc dot gnu.org,
   ||msebor at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
This looks like a major flaw in the gimple-ssa-sprintf.c stuff.
In particular, -W* options should not affect code generationm but the file is
full of conditionals on warn_format_length value.  I think the only way out of
this is to separate the warning handling from the flag_printf_return_value
handling, it can be done by the same functions, but it should differentiate
between warning (then emit warnings, but don't change anything, honor
warn_format_length, ignore flag_printf_return_value), and code changes (in that
case it shouldn't emit warnings, it should ignore warn_format_length, honor
flag_printf_return_value).
I suppose easiest would be to add some boolean into format_result, and:
  if (warn_format_length)
{
  format_result res = format_result (false);
  compute_format_length (info, );
}

  if (flag_printf_return_value && optimize > 0)
{
  format_result res = format_result (true);
  compute_format_length (info, );
  if (!flag_rounding_math || !res.floating)
try_substitute_return_value (gsi, info, res);
}

[Bug target/71767] Endless stream of warnings when using GCC with -Wa,-q and Clang Integrated Assembler

2016-09-21 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71767

--- Comment #23 from Iain Sandoe  ---
(In reply to Francois-Xavier Coudert from comment #22)
> When a fix is designed, could you please backport it to the 6 branch (so it
> can make it into 6.3 for example)? It is also affected.

sure, "all open branches" would be the intent.

[Bug ipa/77674] [7 Regression] ICE in binds_to_current_def_p with -fkeep-inline-functions

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

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

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

[Bug target/77676] New: powerpc64 and powerpc64le stage2 bootstrap fail

2016-09-21 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77676

Bug ID: 77676
   Summary: powerpc64 and powerpc64le stage2 bootstrap fail
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: amodra at gmail dot com
  Target Milestone: ---

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

The attached testcase taken from rs6000.c output_cbranch shows a wrong
optimisation of sprintf to strcpy when compiled with -O2 -Wall.  Yes, -Wall
seems to be necessary.

[Bug ipa/77674] [7 Regression] ICE in binds_to_current_def_p with -fkeep-inline-functions

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

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-09-21
 CC||hubicka at gcc dot gnu.org
  Known to work||6.2.0
   Target Milestone|--- |7.0
Summary|ICE in  |[7 Regression] ICE in
   |binds_to_current_def_p with |binds_to_current_def_p with
   |-fkeep-inline-functions |-fkeep-inline-functions
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.

[Bug tree-optimization/77665] [5/6/7 Regression] ICE in expand_GOMP_SIMD_VF, at internal-fn.c:172

2016-09-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77665

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #2 from Jakub Jelinek  ---
Created attachment 39667
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39667=edit
gcc7-pr77665.patch

Untested fix.

[Bug target/71767] Endless stream of warnings when using GCC with -Wa,-q and Clang Integrated Assembler

2016-09-21 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71767

Francois-Xavier Coudert  changed:

   What|Removed |Added

 CC||fxcoudert at gcc dot gnu.org

--- Comment #22 from Francois-Xavier Coudert  ---
When a fix is designed, could you please backport it to the 6 branch (so it can
make it into 6.3 for example)? It is also affected.

[Bug c/77675] New: optimization level==number of -Wformat-length warnings

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

Bug ID: 77675
   Summary: optimization level==number of -Wformat-length warnings
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

Created attachment 39666
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39666=edit
unreduced testcase

Consider the attached unreduced testcase. The number of redundant warnings
increases with the -O level due to inlining:

markus@x4 /tmp % gcc -O1 -c -Wformat-length algapi.i
crypto/algapi.c: In function ‘crypto_inst_setname’:
crypto/algapi.c:817:6: warning: output may be truncated at or before format
character ‘)’ at offset 5 [-Wformat-length=]
crypto/algapi.c:817:6: note: format output between 3 and 66 bytes into a
destination of size 64

markus@x4 /tmp % cc -O2 -c -Wformat-length algapi.i
crypto/algapi.c: In function ‘crypto_inst_setname’:
crypto/algapi.c:817:6: warning: output may be truncated at or before format
character ‘)’ at offset 5 [-Wformat-length=]
crypto/algapi.c:817:6: note: format output between 3 and 66 bytes into a
destination of size 64
crypto/algapi.c: In function ‘crypto_alloc_instance2’:
crypto/algapi.c:817:6: warning: output may be truncated at or before format
character ‘)’ at offset 5 [-Wformat-length=]
crypto/algapi.c:817:6: note: format output between 3 and 66 bytes into a
destination of size 64

markus@x4 /tmp % gcc -O3 -c -Wformat-length algapi.i
crypto/algapi.c: In function ‘crypto_inst_setname’:
crypto/algapi.c:817:6: warning: output may be truncated at or before format
character ‘)’ at offset 5 [-Wformat-length=]
crypto/algapi.c:817:6: note: format output between 3 and 66 bytes into a
destination of size 64
crypto/algapi.c: In function ‘crypto_alloc_instance2’:
crypto/algapi.c:817:6: warning: output may be truncated at or before format
character ‘)’ at offset 5 [-Wformat-length=]
crypto/algapi.c:817:6: note: format output between 3 and 66 bytes into a
destination of size 64
crypto/algapi.c: In function ‘crypto_alloc_instance’:
crypto/algapi.c:817:6: warning: output may be truncated at or before format
character ‘)’ at offset 5 [-Wformat-length=]
crypto/algapi.c:817:6: note: format output between 3 and 66 bytes into a
destination of size 64

[Bug tree-optimization/77644] missed optimization with sqrt in comparison

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

--- Comment #2 from Richard Biener  ---
Well, even generally sqrt (X) CMP sqrt (Y) -> X CMP Y at least if there are no
NaNs and with -funsafe-math-optimization (because rounding effects could make
sqrt (X) == sqrt (Y) when X != Y).

[Bug c++/72774] [7 Regression] ICE on invalid C++ code on x86_64-linux-gnu (tree check: expected tree that contains ‘decl minimal’ structure, have ‘tree_list’ in consider_binding_level, at cp/name-loo

2016-09-21 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72774

Bernd Schmidt  changed:

   What|Removed |Added

 CC||bernds at gcc dot gnu.org

--- Comment #2 from Bernd Schmidt  ---
I had multidelta reduce a testcase to something that produces the same error -
most likely the same bug.

namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
{
  template < typename _Tp > struct __add_unsigned
  {
  };
  class locale;

template < typename _CharT, typename _InIter > class num_get:public
locale::facet
  {
typedef _InIter iter_type;
template < typename _ValueT >
  __attribute ((__abi_tag__ ("cxx11"))) iter_type
  _M_extract_int (iter_type, iter_type, int &, ios_base::iostate &,
  _ValueT &) const;
  }
  template < typename _CharT,
typename _InIter > template < typename _ValueT >
__attribute ((__abi_tag__ ("cxx11"))) _InIter num_get < _CharT,
_InIter >::_M_extract_int (_InIter __beg, _InIter __end, ios_base & __io,
   ios_base::iostate & __err,
   _ValueT & __v) const const
  {
using __gnu_cxx::__add_unsigned;
typedef __numpunct_cache < _CharT > __cache_type;

[Bug ipa/77674] New: ICE in binds_to_current_def_p with -fkeep-inline-functions

2016-09-21 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77674

Bug ID: 77674
   Summary: ICE in binds_to_current_def_p with
-fkeep-inline-functions
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bernds at gcc dot gnu.org
  Target Milestone: ---

Testcase:

typedef struct { } __fsid_t;
typedef unsigned long int pthread_t;
extern "C" {
  extern __inline __attribute__ ((__gnu_inline__)) int pthread_equal (pthread_t
__thread1, pthread_t __thread2) throw ()   {
  }
}
typedef pthread_t __gthread_t;
static __typeof (pthread_equal)  __gthrw_pthread_equal __attribute__
((__weakref__ ("pthread_equal")));

static inline int __gthread_equal (__gthread_t __t1, __gthread_t __t2)
{
  return __gthrw_pthread_equal (__t1, __t2);
}

Command line (with a normal x86_64-linux compiler):
./cc1plus red4.ii -fpreprocessed -O2 -fkeep-inline-functions -quiet

And the crash:
_ZL21__gthrw_pthread_equalmm/1 (int __gthrw_pthread_equal(pthread_t,
pthread_t)) @0x7f30053f8170
  Type: function definition analyzed alias transparent_alias weakref
  Visibility: weak
  References: pthread_equal/0 (alias)
  Referring: 
  Availability: available
  First run: 0
  Function flags: process
  Called by: _ZL15__gthread_equalmm/2 (1.00 per call) 
  Calls: 
red4.ii: In function ‘int pthread_equal(pthread_t, pthread_t)’:
red4.ii:13:1: internal compiler error: in binds_to_current_def_p, at
symtab.c:2232
 }
 ^
0xa5e668 symtab_node::binds_to_current_def_p(symtab_node*)
../../git/gcc/symtab.c:2232
0xa67d59 set_const_flag_1
../../git/gcc/cgraph.c:2500
0xa67c6c set_const_flag_1
../../git/gcc/cgraph.c:2531
0xa67fdf cgraph_node::set_const_flag(bool, bool)
../../git/gcc/cgraph.c:2562
0x15d05e1 execute
../../git/gcc/ipa-pure-const.c:1831
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug rtl-optimization/77664] Missed optimization: signed int >= 0 && < unsigned short

2016-09-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77664

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Well, IMHO we want to do it not just when you have a >= 0 & a < x
where x is known to have the MSB (from range info) in the comparison type
clear, but also if there is && or the conditions are possibly appart, say
if (a >= 0 && d && e != 21 && f && a < b) etc.
So, I'd think that tree-ssa-reassoc.c would be a better place to optimize this.

So, init_range_entry would need to be taught to handle
GT_EXPR/GE_EXPR/LT_EXPR/LE_EXPR with non-INTEGER_CST second argument by
creating an entry with "symbolic" high and constant low, range_entry_cmp to
sort those last and then deal with it when merging ranges.

[Bug target/77326] [avr] Invalid optimization using varargs and a weak function

2016-09-21 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77326

--- Comment #3 from Georg-Johann Lay  ---
Author: gjl
Date: Wed Sep 21 09:31:38 2016
New Revision: 240308

URL: https://gcc.gnu.org/viewcvs?rev=240308=gcc=rev
Log:
Backport from 2016-09-21 trunk r240306.
PR target/77326
* config/avr/avr.c (avr_notice_update_cc) [CC_NONE]: If insn
touches some regs mentioned in cc_status, do CC_STATUS_INIT.


Added:
branches/gcc-6-branch/gcc/testsuite/gcc.target/avr/torture/pr77326.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/config/avr/avr.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug c++/77651] [7 Regression] c++ -Wno-aligned-new ICEs

2016-09-21 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77651

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #5 from Jakub Jelinek  ---
Created attachment 39665
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39665=edit
gcc7-pr77651.patch

Untested fix.

[Bug tree-optimization/66012] Sub-optimal 64bit load is generated instead of zero-extension

2016-09-21 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66012

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2015-12-23 00:00:00 |2016-9-21

--- Comment #4 from Andrew Pinski  ---
On the trunk we generate one 32bit load and one 64bit load (at least for
aarch64):
test:
adrpx0, l
add x1, x0, :lo12:l
ldr w0, [x0, #:lo12:l]   ; 32bit load to w0
ldr x1, [x1, 8]  ; 64bit load to x1
orr x0, x0, x1, lsl 32
ret

[Bug target/77326] [avr] Invalid optimization using varargs and a weak function

2016-09-21 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77326

--- Comment #2 from Georg-Johann Lay  ---
Author: gjl
Date: Wed Sep 21 09:17:32 2016
New Revision: 240306

URL: https://gcc.gnu.org/viewcvs?rev=240306=gcc=rev
Log:
gcc/
PR target/77326
* config/avr/avr.c (avr_notice_update_cc) [CC_NONE]: If insn
touches some regs mentioned in cc_status, do CC_STATUS_INIT.
gcc/testsuite/
PR target/77326
* gcc.target/avr/torture/pr77326.c: New test.


Added:
trunk/gcc/testsuite/gcc.target/avr/torture/pr77326.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr.c
trunk/gcc/testsuite/ChangeLog

[Bug bootstrap/66038] [5 regression] (stage 2) build/genmatch issue (gcc/hash-table.h|c) with --disable-checking [ introduced by r218976 ]

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

--- Comment #39 from Richard Biener  ---
I believe the --disable-checking issue on ppc is still there.  Wonder if
somebody can try on ppc-linux ... (or other archs, I believe just nobody uses
--disable-checking)

  1   2   >