[Bug c++/71210] [6/7 Regression] internal compiler error: in assign_temp, at function.c:961

2016-05-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71210

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-05-20
 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |6.2
Summary|internal compiler error: in |[6/7 Regression] internal
   |assign_temp, at |compiler error: in
   |function.c:961  |assign_temp, at
   ||function.c:961
 Ever confirmed|0   |1

[Bug c++/71210] [6/7 Regression] internal compiler error: in assign_temp, at function.c:961

2016-05-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71210

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #1 from Jakub Jelinek  ---
Created attachment 38533
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38533&action=edit
gcc7-pr71210.patch

Untested fix.

[Bug other/71212] Compilation of gcc (libstdc++) for foreign target platform problem.

2016-05-20 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71212

--- Comment #1 from Jonathan Wakely  ---
Shouldn't you be using --with-sysroot to tell GCC where to find the target libs
for the cross-compiler?

[Bug rtl-optimization/71148] [7 Regression] Compile time hog w/ -O3 -funroll-loops

2016-05-20 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71148

--- Comment #8 from Ilya Enkovich  ---
(In reply to Eric Botcazou from comment #7)
> Thanks.  Please add a reference to the PR in the ChangeLog next time, this
> will automatically add a cross-reference in the audit trail.

I did add PR reference but it didn't work for some reason.

[Bug tree-optimization/71206] [7 Regression] ICE on valid code at all optimization levels in both 32-bit and 64-bit modes on x86_64-linux-gnu. (verify_gimple failed)

2016-05-20 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71206

Ilya Enkovich  changed:

   What|Removed |Added

 CC||ienkovich at gcc dot gnu.org

--- Comment #5 from Ilya Enkovich  ---
(In reply to Marc Glisse from comment #4)
> I am starting a bootstrap+regtest with:

Could you please also check if it is a dup of PR71079?

[Bug fortran/71204] [5/6/7 Regression] ICE with -O0 in expand_expr_real_1, at expr.c:9651

2016-05-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71204

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 38534
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38534&action=edit
gcc7-pr71204.patch

Untested fix.

[Bug fortran/70931] [4.9/5 Regression] ICE with -g in native_encode_initializer, bei dwarf2out.c:17768

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70931

--- Comment #7 from Richard Biener  ---
Author: rguenth
Date: Fri May 20 08:51:06 2016
New Revision: 236497

URL: https://gcc.gnu.org/viewcvs?rev=236497&root=gcc&view=rev
Log:
2016-05-20  Richard Biener  

Backport from mainline
2016-02-01  Bin Cheng  

PR tree-optimization/67921
* fold-const.c (split_tree): New parameters.  Convert pointer
type variable part to proper type before negating. 
(fold_binary_loc): Pass new arguments to split_tree.

* c-c++-common/ubsan/pr67921.c: New test.

2016-05-06  Richard Biener  

PR middle-end/70941
* fold-const.c (split_tree): Always convert to the original type
before negating.

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

2016-05-06  Jakub Jelinek  

PR middle-end/70941
* gcc.dg/torture/pr70941.c (abort): Remove prototype.
(a, b, c, d): Change type from char to signed char.
(main): Compare against (signed char) -1634678893 instead of
hardcoded -109.  Use __builtin_abort instead of abort.

2016-05-06  Richard Biener  

PR middle-end/70931
* dwarf2out.c (native_encode_initializer): Skip zero-sized fields.

* gfortran.dg/pr70931.f90: New testcase.

2016-04-14  Richard Biener  

PR tree-optimization/70623
* tree-ssa-pre.c (changed_blocks): Make global ...
(compute_antic): ... local here.  Move and fix worklist
handling here.  Do not clear EDGE_DFS_BACK.
(compute_antic_aux): Add dumping for MAX assumed succs.  Remove
worklist handling, dump when ANTIC_IN changed.
(compute_partial_antic_aux): Remove worklist handling.
(init_pre): Do not compute post dominators.  Add a comment about
the CFG order chosen.
(fini_pre): Do not free post dominators.

* gcc.dg/torture/pr70623.c: New testcase.
* gcc.dg/torture/pr70623-2.c: Likewise.

2016-04-25  Richard Biener  

PR tree-optimization/70780
* tree-ssa-pre.c (compute_antic_aux): Also return true if the block
wasn't visited yet.
(compute_antic): Mark blocks with abnormal preds as visited as
they have a final empty antic-in solution already.

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

Added:
branches/gcc-5-branch/gcc/testsuite/c-c++-common/ubsan/pr67921.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70623-2.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70623.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70780.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70941.c
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr70931.f90
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/dwarf2out.c
branches/gcc-5-branch/gcc/fold-const.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/tree-ssa-pre.c

[Bug tree-optimization/67921] [6 Regression] "internal compiler error: in build_polynomial_chrec, at tree-chrec.h:147" when using -fsanitize=undefined

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67921

--- Comment #12 from Richard Biener  ---
Author: rguenth
Date: Fri May 20 08:51:06 2016
New Revision: 236497

URL: https://gcc.gnu.org/viewcvs?rev=236497&root=gcc&view=rev
Log:
2016-05-20  Richard Biener  

Backport from mainline
2016-02-01  Bin Cheng  

PR tree-optimization/67921
* fold-const.c (split_tree): New parameters.  Convert pointer
type variable part to proper type before negating. 
(fold_binary_loc): Pass new arguments to split_tree.

* c-c++-common/ubsan/pr67921.c: New test.

2016-05-06  Richard Biener  

PR middle-end/70941
* fold-const.c (split_tree): Always convert to the original type
before negating.

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

2016-05-06  Jakub Jelinek  

PR middle-end/70941
* gcc.dg/torture/pr70941.c (abort): Remove prototype.
(a, b, c, d): Change type from char to signed char.
(main): Compare against (signed char) -1634678893 instead of
hardcoded -109.  Use __builtin_abort instead of abort.

2016-05-06  Richard Biener  

PR middle-end/70931
* dwarf2out.c (native_encode_initializer): Skip zero-sized fields.

* gfortran.dg/pr70931.f90: New testcase.

2016-04-14  Richard Biener  

PR tree-optimization/70623
* tree-ssa-pre.c (changed_blocks): Make global ...
(compute_antic): ... local here.  Move and fix worklist
handling here.  Do not clear EDGE_DFS_BACK.
(compute_antic_aux): Add dumping for MAX assumed succs.  Remove
worklist handling, dump when ANTIC_IN changed.
(compute_partial_antic_aux): Remove worklist handling.
(init_pre): Do not compute post dominators.  Add a comment about
the CFG order chosen.
(fini_pre): Do not free post dominators.

* gcc.dg/torture/pr70623.c: New testcase.
* gcc.dg/torture/pr70623-2.c: Likewise.

2016-04-25  Richard Biener  

PR tree-optimization/70780
* tree-ssa-pre.c (compute_antic_aux): Also return true if the block
wasn't visited yet.
(compute_antic): Mark blocks with abnormal preds as visited as
they have a final empty antic-in solution already.

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

Added:
branches/gcc-5-branch/gcc/testsuite/c-c++-common/ubsan/pr67921.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70623-2.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70623.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70780.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70941.c
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr70931.f90
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/dwarf2out.c
branches/gcc-5-branch/gcc/fold-const.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/tree-ssa-pre.c

[Bug tree-optimization/70780] [6/7 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70780

--- Comment #8 from Richard Biener  ---
Author: rguenth
Date: Fri May 20 08:51:06 2016
New Revision: 236497

URL: https://gcc.gnu.org/viewcvs?rev=236497&root=gcc&view=rev
Log:
2016-05-20  Richard Biener  

Backport from mainline
2016-02-01  Bin Cheng  

PR tree-optimization/67921
* fold-const.c (split_tree): New parameters.  Convert pointer
type variable part to proper type before negating. 
(fold_binary_loc): Pass new arguments to split_tree.

* c-c++-common/ubsan/pr67921.c: New test.

2016-05-06  Richard Biener  

PR middle-end/70941
* fold-const.c (split_tree): Always convert to the original type
before negating.

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

2016-05-06  Jakub Jelinek  

PR middle-end/70941
* gcc.dg/torture/pr70941.c (abort): Remove prototype.
(a, b, c, d): Change type from char to signed char.
(main): Compare against (signed char) -1634678893 instead of
hardcoded -109.  Use __builtin_abort instead of abort.

2016-05-06  Richard Biener  

PR middle-end/70931
* dwarf2out.c (native_encode_initializer): Skip zero-sized fields.

* gfortran.dg/pr70931.f90: New testcase.

2016-04-14  Richard Biener  

PR tree-optimization/70623
* tree-ssa-pre.c (changed_blocks): Make global ...
(compute_antic): ... local here.  Move and fix worklist
handling here.  Do not clear EDGE_DFS_BACK.
(compute_antic_aux): Add dumping for MAX assumed succs.  Remove
worklist handling, dump when ANTIC_IN changed.
(compute_partial_antic_aux): Remove worklist handling.
(init_pre): Do not compute post dominators.  Add a comment about
the CFG order chosen.
(fini_pre): Do not free post dominators.

* gcc.dg/torture/pr70623.c: New testcase.
* gcc.dg/torture/pr70623-2.c: Likewise.

2016-04-25  Richard Biener  

PR tree-optimization/70780
* tree-ssa-pre.c (compute_antic_aux): Also return true if the block
wasn't visited yet.
(compute_antic): Mark blocks with abnormal preds as visited as
they have a final empty antic-in solution already.

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

Added:
branches/gcc-5-branch/gcc/testsuite/c-c++-common/ubsan/pr67921.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70623-2.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70623.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70780.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70941.c
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr70931.f90
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/dwarf2out.c
branches/gcc-5-branch/gcc/fold-const.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/tree-ssa-pre.c

[Bug tree-optimization/70623] [4.9 Regression] ICE in compute_antic at -O2

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70623

--- Comment #10 from Richard Biener  ---
Author: rguenth
Date: Fri May 20 08:51:06 2016
New Revision: 236497

URL: https://gcc.gnu.org/viewcvs?rev=236497&root=gcc&view=rev
Log:
2016-05-20  Richard Biener  

Backport from mainline
2016-02-01  Bin Cheng  

PR tree-optimization/67921
* fold-const.c (split_tree): New parameters.  Convert pointer
type variable part to proper type before negating. 
(fold_binary_loc): Pass new arguments to split_tree.

* c-c++-common/ubsan/pr67921.c: New test.

2016-05-06  Richard Biener  

PR middle-end/70941
* fold-const.c (split_tree): Always convert to the original type
before negating.

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

2016-05-06  Jakub Jelinek  

PR middle-end/70941
* gcc.dg/torture/pr70941.c (abort): Remove prototype.
(a, b, c, d): Change type from char to signed char.
(main): Compare against (signed char) -1634678893 instead of
hardcoded -109.  Use __builtin_abort instead of abort.

2016-05-06  Richard Biener  

PR middle-end/70931
* dwarf2out.c (native_encode_initializer): Skip zero-sized fields.

* gfortran.dg/pr70931.f90: New testcase.

2016-04-14  Richard Biener  

PR tree-optimization/70623
* tree-ssa-pre.c (changed_blocks): Make global ...
(compute_antic): ... local here.  Move and fix worklist
handling here.  Do not clear EDGE_DFS_BACK.
(compute_antic_aux): Add dumping for MAX assumed succs.  Remove
worklist handling, dump when ANTIC_IN changed.
(compute_partial_antic_aux): Remove worklist handling.
(init_pre): Do not compute post dominators.  Add a comment about
the CFG order chosen.
(fini_pre): Do not free post dominators.

* gcc.dg/torture/pr70623.c: New testcase.
* gcc.dg/torture/pr70623-2.c: Likewise.

2016-04-25  Richard Biener  

PR tree-optimization/70780
* tree-ssa-pre.c (compute_antic_aux): Also return true if the block
wasn't visited yet.
(compute_antic): Mark blocks with abnormal preds as visited as
they have a final empty antic-in solution already.

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

Added:
branches/gcc-5-branch/gcc/testsuite/c-c++-common/ubsan/pr67921.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70623-2.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70623.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70780.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70941.c
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr70931.f90
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/dwarf2out.c
branches/gcc-5-branch/gcc/fold-const.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/tree-ssa-pre.c

[Bug target/70941] [5 Regression] Test miscompiled with -O2.

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70941

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug target/70941] [5 Regression] Test miscompiled with -O2.

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70941

--- Comment #15 from Richard Biener  ---
Author: rguenth
Date: Fri May 20 08:51:06 2016
New Revision: 236497

URL: https://gcc.gnu.org/viewcvs?rev=236497&root=gcc&view=rev
Log:
2016-05-20  Richard Biener  

Backport from mainline
2016-02-01  Bin Cheng  

PR tree-optimization/67921
* fold-const.c (split_tree): New parameters.  Convert pointer
type variable part to proper type before negating. 
(fold_binary_loc): Pass new arguments to split_tree.

* c-c++-common/ubsan/pr67921.c: New test.

2016-05-06  Richard Biener  

PR middle-end/70941
* fold-const.c (split_tree): Always convert to the original type
before negating.

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

2016-05-06  Jakub Jelinek  

PR middle-end/70941
* gcc.dg/torture/pr70941.c (abort): Remove prototype.
(a, b, c, d): Change type from char to signed char.
(main): Compare against (signed char) -1634678893 instead of
hardcoded -109.  Use __builtin_abort instead of abort.

2016-05-06  Richard Biener  

PR middle-end/70931
* dwarf2out.c (native_encode_initializer): Skip zero-sized fields.

* gfortran.dg/pr70931.f90: New testcase.

2016-04-14  Richard Biener  

PR tree-optimization/70623
* tree-ssa-pre.c (changed_blocks): Make global ...
(compute_antic): ... local here.  Move and fix worklist
handling here.  Do not clear EDGE_DFS_BACK.
(compute_antic_aux): Add dumping for MAX assumed succs.  Remove
worklist handling, dump when ANTIC_IN changed.
(compute_partial_antic_aux): Remove worklist handling.
(init_pre): Do not compute post dominators.  Add a comment about
the CFG order chosen.
(fini_pre): Do not free post dominators.

* gcc.dg/torture/pr70623.c: New testcase.
* gcc.dg/torture/pr70623-2.c: Likewise.

2016-04-25  Richard Biener  

PR tree-optimization/70780
* tree-ssa-pre.c (compute_antic_aux): Also return true if the block
wasn't visited yet.
(compute_antic): Mark blocks with abnormal preds as visited as
they have a final empty antic-in solution already.

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

Added:
branches/gcc-5-branch/gcc/testsuite/c-c++-common/ubsan/pr67921.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70623-2.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70623.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70780.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/torture/pr70941.c
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr70931.f90
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/dwarf2out.c
branches/gcc-5-branch/gcc/fold-const.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/tree-ssa-pre.c

[Bug c++/71207] [5/6/7 Regression] gcc 5.3 and 6.1 generates wrong code with -O2

2016-05-20 Thread vladimir.simonov at acronis dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71207

--- Comment #3 from Vladimir Simonov  ---
(In reply to Jakub Jelinek from comment #2)
> Started with r229859, -fno-devirtualize -O2 works.

Thank you for hint with workaround

[Bug tree-optimization/71206] [7 Regression] ICE on valid code at all optimization levels in both 32-bit and 64-bit modes on x86_64-linux-gnu. (verify_gimple failed)

2016-05-20 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71206

--- Comment #6 from Marc Glisse  ---
(In reply to Ilya Enkovich from comment #5)
> Could you please also check if it is a dup of PR71079?

Cf https://gcc.gnu.org/ml/gcc-patches/2016-05/msg01598.html ;-)

[Bug target/71185] [7 Regression] ice in gimplify_modify_expr, at gimplify.c:4873

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71185

--- Comment #7 from Richard Biener  ---
Author: rguenth
Date: Fri May 20 09:09:28 2016
New Revision: 236499

URL: https://gcc.gnu.org/viewcvs?rev=236499&root=gcc&view=rev
Log:
2016-05-20  Richard Biener  

PR tree-optimization/71185
* tree-ssa-loop-prefetch.c (gather_memory_references): Drop
register operations.

* gcc.dg/tree-ssa/pr71185.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr71185.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-loop-prefetch.c

[Bug target/71185] [7 Regression] ice in gimplify_modify_expr, at gimplify.c:4873

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71185

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug target/70809] [AArch64] aarch64_vmls pattern should be rejected if -ffp-contract=off

2016-05-20 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70809

--- Comment #6 from ktkachov at gcc dot gnu.org ---
Author: ktkachov
Date: Fri May 20 09:12:59 2016
New Revision: 236500

URL: https://gcc.gnu.org/viewcvs?rev=236500&root=gcc&view=rev
Log:
[AArch64] PR target/70809: Delete aarch64_vmls pattern

Backport from mainline
2016-05-17  Kyrylo Tkachov  

PR target/70809
* config/aarch64/aarch64-simd.md (aarch64_vmls): Delete.

* gcc.target/aarch64/pr70809_1.c: New test.


Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/aarch64/pr70809_1.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/config/aarch64/aarch64-simd.md
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog

[Bug target/70809] [AArch64] aarch64_vmls pattern should be rejected if -ffp-contract=off

2016-05-20 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70809

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #7 from ktkachov at gcc dot gnu.org ---
Fixed on all active branches.

[Bug middle-end/29756] SSE intrinsics hard to use without redundant temporaries appearing

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29756

--- Comment #14 from Richard Biener  ---
Author: rguenth
Date: Fri May 20 09:17:16 2016
New Revision: 236501

URL: https://gcc.gnu.org/viewcvs?rev=236501&root=gcc&view=rev
Log:
2016-05-20  Richard Guenther  

PR tree-optimization/29756
* tree.def (BIT_INSERT_EXPR): New tcc_expression tree code.
* expr.c (expand_expr_real_2): Handle BIT_INSERT_EXPR.
* fold-const.c (operand_equal_p): Likewise.
(fold_ternary_loc): Add constant folding of BIT_INSERT_EXPR.
* gimplify.c (gimplify_expr): Handle BIT_INSERT_EXPR.
* tree-inline.c (estimate_operator_cost): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-ssa-operands.c (get_expr_operands): Likewise.
* cfgexpand.c (expand_debug_expr): Likewise.
* gimple-pretty-print.c (dump_ternary_rhs): Likewise.
* gimple.c (get_gimple_rhs_num_ops): Handle BIT_INSERT_EXPR.
* tree-cfg.c (verify_gimple_assign_ternary): Verify BIT_INSERT_EXPR.

* tree-ssa.c (non_rewritable_lvalue_p): We can rewrite
vector inserts using BIT_FIELD_REF or MEM_REF on the lhs.
(execute_update_addresses_taken): Do it.

* gcc.dg/tree-ssa/vector-6.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/vector-6.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfgexpand.c
trunk/gcc/expr.c
trunk/gcc/fold-const.c
trunk/gcc/gimple-pretty-print.c
trunk/gcc/gimple.c
trunk/gcc/gimplify.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-cfg.c
trunk/gcc/tree-inline.c
trunk/gcc/tree-pretty-print.c
trunk/gcc/tree-ssa-operands.c
trunk/gcc/tree-ssa.c
trunk/gcc/tree.def

[Bug target/71191] aarch64 and others: __atomic_load;arithmetic;__atomic_compare_exchange loops should be able to generate better code with LL/SC-type constructs than a CAS loop

2016-05-20 Thread dhowells at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71191

--- Comment #6 from dhowells at redhat dot com  ---
There are a couple of ways the problem could be reduced in scope.  Most of the
constructs that the kernel has that fall into this category are conditional
adds/subtracts:

typedef struct { int counter; } atomic_t;
bool atomic_inc_unless_negative(atomic_t *v)
bool atomic_dec_unless_positive(atomic_t *v)
bool atomic_inc_not_zero(atomic_t *v)
bool atomic_dec_if_positive(atomic_t *v)
bool atomic_add_unless(atomic_t *v, int addend, int unless)

all of which conform to a pattern that looks like:

({
TYPE cur = __atomic_load_n(PTR, __ATOMIC_RELAXED);
TYPE new;
bool added = true;

do {
if (cur COMPARISON COMPAREND) {
added = false;
break;
}
new = cur + ADDEND;
} while (!__atomic_compare_exchange_n(PTR,
  &cur, new,
  false,
  __ATOMIC_SEQ_CST,
  __ATOMIC_RELAXED));
added;
})

where PTR is a pointer to the memory variable to be modified, TYPE is the type
of *PTR, ADDEND and COMPAREND are integer values and COMPARISON is a numeric
comparison.  Then there's:

bool atomic_inc_not_zero_hint(atomic_t *v, int hint)

This is similar to the above, except that hint is used in place of the initial
__atomic_load_n().  Note that if you're doing LL/SC rather than a CAS loop, the
hint is of no interest.

And then there is:

int __atomic_add_unless(atomic_t *v, int addend, int unless)

which returns the original value of v->counter instead of an indication as to
the success.  I would probably replace this with something like:

bool atomic_add_unless_return(atomic_t *v, int addend, int unless, int
*_orig)

and return the original value of v->counter through the *_orig so that it
conforms more closely with the pattern above.


So the two ways to reduce the scope of the problem that I'm thinking of are:

 (1) Add very restricted patterns.  Just a single comparison and an add.

 (2) Add extra intrinsics.  I presume there would need to be one per
comparison:

bool __atomic_fetch_add_if_eq(T *ptr, T addend, T comparend, T *_orig,
 int memorder_yes, int memorder_no);
bool __atomic_fetch_add_if_ne(...);
bool __atomic_fetch_add_if_lt(...);
bool __atomic_fetch_add_if_le(...);
bool __atomic_fetch_add_if_gt(...);
bool __atomic_fetch_add_if_ge(...);

[Bug rtl-optimization/71148] [7 Regression] Compile time hog w/ -O3 -funroll-loops

2016-05-20 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71148

--- Comment #9 from Eric Botcazou  ---
> I did add PR reference but it didn't work for some reason.

No, you didn't in the commit message, which is where it is needed:
  https://gcc.gnu.org/ml/gcc-cvs/2016-05/msg00780.html

[Bug rtl-optimization/71148] [7 Regression] Compile time hog w/ -O3 -funroll-loops

2016-05-20 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71148

--- Comment #10 from Ilya Enkovich  ---
(In reply to Eric Botcazou from comment #9)
> > I did add PR reference but it didn't work for some reason.
> 
> No, you didn't in the commit message, which is where it is needed:
>   https://gcc.gnu.org/ml/gcc-cvs/2016-05/msg00780.html

I see, thanks.

[Bug c++/71210] [6/7 Regression] internal compiler error: in assign_temp, at function.c:961

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71210

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug target/71208] [6 regression] mmix: C++ code fails to link

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71208

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4
   Target Milestone|--- |6.2

--- Comment #1 from Richard Biener  ---
Note this still looks like a binutils issue, so please report it against
binutils as well.

[Bug ipa/71207] [5/6/7 Regression] gcc 5.3 and 6.1 generates wrong code with -O2

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71207

Richard Biener  changed:

   What|Removed |Added

   Keywords||wrong-code
   Priority|P3  |P2
  Component|c++ |ipa

[Bug tree-optimization/71079] ICE on valid code at -O1 and above on x86_64-linux-gnu: verify_gimple failed

2016-05-20 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71079

--- Comment #2 from Marc Glisse  ---
Author: glisse
Date: Fri May 20 09:44:50 2016
New Revision: 236504

URL: https://gcc.gnu.org/viewcvs?rev=236504&root=gcc&view=rev
Log:
PR71206: inconsistent types after match.pd transformation

2016-05-20  Marc Glisse  

PR tree-optimization/71079
PR tree-optimization/71206
gcc/
* match.pd ((X ^ Y) ^ (X ^ Z)): Convert the arguments.

gcc/testsuite/
* gcc.dg/tree-ssa/pr71206.c: New testcase.


Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/71206.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog

[Bug tree-optimization/71206] [7 Regression] ICE on valid code at all optimization levels in both 32-bit and 64-bit modes on x86_64-linux-gnu. (verify_gimple failed)

2016-05-20 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71206

--- Comment #7 from Marc Glisse  ---
Author: glisse
Date: Fri May 20 09:44:50 2016
New Revision: 236504

URL: https://gcc.gnu.org/viewcvs?rev=236504&root=gcc&view=rev
Log:
PR71206: inconsistent types after match.pd transformation

2016-05-20  Marc Glisse  

PR tree-optimization/71079
PR tree-optimization/71206
gcc/
* match.pd ((X ^ Y) ^ (X ^ Z)): Convert the arguments.

gcc/testsuite/
* gcc.dg/tree-ssa/pr71206.c: New testcase.


Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/71206.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog

[Bug tree-optimization/71079] ICE on valid code at -O1 and above on x86_64-linux-gnu: verify_gimple failed

2016-05-20 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71079

Marc Glisse  changed:

   What|Removed |Added

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

--- Comment #3 from Marc Glisse  ---
.

[Bug tree-optimization/71206] [7 Regression] ICE on valid code at all optimization levels in both 32-bit and 64-bit modes on x86_64-linux-gnu. (verify_gimple failed)

2016-05-20 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71206

Marc Glisse  changed:

   What|Removed |Added

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

--- Comment #8 from Marc Glisse  ---
.

[Bug fortran/71196] f951: internal compiler error: in gfc_conv_string_init, at fortran/trans-const.c:149

2016-05-20 Thread georg.bugzilla at gmx dot at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71196

--- Comment #2 from georg.bugzilla at gmx dot at ---
Thanks for the feedback!

I can confirm that workaround 1 (reversing order in substructure_)works.

Workaround 2 also works, but it is not applicable in my case (auto generated
code - arbitrary level of hierarchy)

I found another work around : adding an unused integer dummy to substructure_
also helped.

Cheers

[Bug middle-end/29756] SSE intrinsics hard to use without redundant temporaries appearing

2016-05-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=29756

--- Comment #15 from Jakub Jelinek  ---
Author: jakub
Date: Fri May 20 11:55:58 2016
New Revision: 236505

URL: https://gcc.gnu.org/viewcvs?rev=236505&root=gcc&view=rev
Log:
PR tree-optimization/29756
gcc.dg/tree-ssa/vector-6.c: Add -Wno-psabi -w to dg-options.
Add -msse2 for x86 and -maltivec for powerpc.  Use scan-tree-dump-times
only on selected targets where V4SImode vectors are known to be
supported.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/vector-6.c

[Bug other/71212] Compilation of gcc (libstdc++) for foreign target platform problem.

2016-05-20 Thread abominable-snowman at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71212

--- Comment #2 from Petr Ovtchenkov  ---
No, adding

--with-sysroot=/export/staging/ptr/continuous/development/../arm-unknown-linux-gnueabi
\
   
--oldincludedir=/export/staging/ptr/continuous/development/../arm-unknown-linux-gnueabi/usr/include
 

don't change situation at all:

...

libtool: compile: 
/export/staging/ptr/continuous/development/../toolchain-arm-continuous-linux-gnueabi/bin/arm-continuous-linux-gnueabi-c++
-I/export/staging/ptr/continuous/development/build-gcc/arm-unknown-linux-gnueabi/libstdc++-v3/include/arm-unknown-linux-gnueabi
-I/export/staging/ptr/continuous/development/build-gcc/arm-unknown-linux-gnueabi/libstdc++-v3/include
-I/export/staging/ptr/continuous/development/gcc/libstdc++-v3/libsupc++
-I/usr/include -std=gnu++98 -fPIC -DPIC -fno-implicit-templates -Wall -Wextra
-Wwrite-strings -Wcast-qual -Wabi -fdiagnostics-show-location=once
-ffunction-sections -fdata-sections -frandom-seed=compatibility.lo -g -O2
-D_GNU_SOURCE -c ../../../../gcc/libstdc++-v3/src/c++98/compatibility.cc  -fPIC
-DPIC -D_GLIBCXX_SHARED -o .libs/compatibility.o
...

The -I/usr/include still here.

BTW, --with-sysroot not required, due to DESTDIR=${SYSROOT}.

[Bug c++/71210] [6/7 Regression] internal compiler error: in assign_temp, at function.c:961

2016-05-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71210

--- Comment #2 from Jakub Jelinek  ---
Author: jakub
Date: Fri May 20 11:58:49 2016
New Revision: 236506

URL: https://gcc.gnu.org/viewcvs?rev=236506&root=gcc&view=rev
Log:
PR c++/71210
* gimple-fold.c (gimple_fold_call): Do not remove lhs of noreturn
calls if the LHS is variable length or has addressable type.
If targets[0]->decl is a noreturn call with void return type and
zero arguments, adjust fntype and remove lhs in that case.

* g++.dg/opt/pr71210-1.C: New test.
* g++.dg/opt/pr71210-2.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/opt/pr71210-1.C
trunk/gcc/testsuite/g++.dg/opt/pr71210-2.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-fold.c
trunk/gcc/testsuite/ChangeLog

[Bug testsuite/52563] FAIL: gcc.dg/tree-ssa/scev-[3,4].c scan-tree-dump-times optimized "&a" 1

2016-05-20 Thread andre.simoesdiasvieira at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52563

Andre Vieira  changed:

   What|Removed |Added

 CC||andre.simoesdiasvieira@arm.
   ||com

--- Comment #12 from Andre Vieira  ---
Same regression observed on arm-none-eabi.

[Bug other/71212] Compilation of gcc (libstdc++) for foreign target platform problem.

2016-05-20 Thread abominable-snowman at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71212

--- Comment #3 from Petr Ovtchenkov  ---
(In reply to Petr Ovtchenkov from comment #2)
> ...

Mmm, may be this line is origin of problem:

libstdc++-v3/configure:GLIBCXX_INCLUDES="$GLIBCXX_INCLUDES
-I\${includedir}"

(missed ${DESTDIR} in -I\${includedir}?)

Uups, following patch will "resolve" issue:

diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index 41797a9..25f7418 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -81334,9 +81334,9 @@ $as_echo "$gxx_include_dir" >&6; }
 -I$glibcxx_srcdir/libsupc++"

   # For Canadian crosses, pick this up too.
-  if test $CANADIAN = yes; then
-GLIBCXX_INCLUDES="$GLIBCXX_INCLUDES -I\${includedir}"
-  fi
+#  if test $CANADIAN = yes; then
+#GLIBCXX_INCLUDES="$GLIBCXX_INCLUDES -I\${includedir}"
+#  fi

   # Stuff in the actual top level.  Currently only used by libsupc++ to
   # get unwind* headers from the libgcc dir.


What is CANADIAN?

[Bug tree-optimization/70729] Loop marked with omp simd pragma is not vectorized

2016-05-20 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70729

--- Comment #18 from Andreas Schwab  ---
FAIL: gfortran.dg/graphite/pr68279.f90   -O  (internal compiler error)

/opt/gcc/gcc-20160520/gcc/testsuite/gfortran.dg/graphite/pr68279.f90:8:0:
internal compiler error: Aborted
0xb9e487 crash_signal
../../gcc/toplev.c:333
0x10f4473 extract_affine_chrec
../../gcc/graphite-sese-to-poly.c:239
0x10f4473 extract_affine
../../gcc/graphite-sese-to-poly.c:381
0x10f404f extract_affine
../../gcc/graphite-sese-to-poly.c:421
0x10f404f extract_affine
../../gcc/graphite-sese-to-poly.c:421
0x10f538b add_condition_to_pbb
../../gcc/graphite-sese-to-poly.c:458
0x10f538b add_conditions_to_domain
../../gcc/graphite-sese-to-poly.c:525
0x10f538b build_iteration_domains
../../gcc/graphite-sese-to-poly.c:1017
0x10f5243 build_iteration_domains
../../gcc/graphite-sese-to-poly.c:1040
0x10f5a6f build_poly_scop(scop*)
../../gcc/graphite-sese-to-poly.c:1364
0x10df8d3 graphite_transform_loops()
../../gcc/graphite.c:319
0x10dfe37 graphite_transforms
../../gcc/graphite.c:356
0x10dfe37 execute
../../gcc/graphite.c:433

[Bug libstdc++/71081] experimental/memory_resource/1.cc run for targets without atomics

2016-05-20 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71081

--- Comment #3 from Thomas Preud'homme  ---
Author: thopre01
Date: Fri May 20 12:36:57 2016
New Revision: 236507

URL: https://gcc.gnu.org/viewcvs?rev=236507&root=gcc&view=rev
Log:
2016-05-20  Thomas Preud'homme  

PR libstdc++/71081
* testsuite/experimental/memory_resource/1.cc: Add required argument
to dg-require-atomic-builtins.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/experimental/memory_resource/1.cc

[Bug tree-optimization/70729] Loop marked with omp simd pragma is not vectorized

2016-05-20 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70729

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ktkachov at gcc dot gnu.org

--- Comment #19 from ktkachov at gcc dot gnu.org ---
Also seeing this on aarch64-none-linux-gnu

[Bug fortran/66461] [4.9/5/6/7 Regression] ICE on missing end program in fixed source

2016-05-20 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66461

--- Comment #13 from Dominique d'Humieres  ---
> I have a patch testing for this.  I am not sure this is a regression. 
> I see it as far back as 4.5.  I don't have any earlier builds. 

Gcc-4.3.1 and 4.4.7 give the errors

pr66461.f:4.27:

 if ( x(1) < 0 .or. 
  1
Error: Syntax error in expression at (1)
Error: Unexpected end of file in 'pr66461.f'

> My thinking is that since this is an ICE on invalid code, I don't want
> to bother with backports, unless this is just really burning someone somehow.

Although I partially agree with that, I don't understand why

 if ( x(1) < 0 .or.  &
 x(2) < 0 ) print *, x

does not trigger any matching error in free form, while

 if ( x(1) < 0 .or.
 &x(2) < 0 ) print *, x

does in fixed form. IMO there is latent bug in the parser.

[Bug testsuite/52563] FAIL: gcc.dg/tree-ssa/scev-[3,4].c scan-tree-dump-times optimized "&a" 1

2016-05-20 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52563

--- Comment #13 from rguenther at suse dot de  ---
On Fri, 20 May 2016, andre.simoesdiasvieira at arm dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52563
> 
> Andre Vieira  changed:
> 
>What|Removed |Added
> 
>  CC||andre.simoesdiasvieira@arm.
>||com
> 
> --- Comment #12 from Andre Vieira  ---
> Same regression observed on arm-none-eabi.

Note the scanning is for final value replacement and it seems IVO now
has an initial value using &a as well.  So maybe instead scan the
scev-ccp dump.

[Bug tree-optimization/70729] Loop marked with omp simd pragma is not vectorized

2016-05-20 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70729

--- Comment #20 from rguenther at suse dot de  ---
On Fri, 20 May 2016, sch...@linux-m68k.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70729
> 
> --- Comment #18 from Andreas Schwab  ---
> FAIL: gfortran.dg/graphite/pr68279.f90   -O  (internal compiler error)
> 
> /opt/gcc/gcc-20160520/gcc/testsuite/gfortran.dg/graphite/pr68279.f90:8:0:
> internal compiler error: Aborted
> 0xb9e487 crash_signal
> ../../gcc/toplev.c:333
> 0x10f4473 extract_affine_chrec
> ../../gcc/graphite-sese-to-poly.c:239
> 0x10f4473 extract_affine
> ../../gcc/graphite-sese-to-poly.c:381
> 0x10f404f extract_affine
> ../../gcc/graphite-sese-to-poly.c:421
> 0x10f404f extract_affine
> ../../gcc/graphite-sese-to-poly.c:421
> 0x10f538b add_condition_to_pbb
> ../../gcc/graphite-sese-to-poly.c:458
> 0x10f538b add_conditions_to_domain
> ../../gcc/graphite-sese-to-poly.c:525
> 0x10f538b build_iteration_domains
> ../../gcc/graphite-sese-to-poly.c:1017
> 0x10f5243 build_iteration_domains
> ../../gcc/graphite-sese-to-poly.c:1040
> 0x10f5a6f build_poly_scop(scop*)
> ../../gcc/graphite-sese-to-poly.c:1364
> 0x10df8d3 graphite_transform_loops()
> ../../gcc/graphite.c:319
> 0x10dfe37 graphite_transforms
> ../../gcc/graphite.c:356
> 0x10dfe37 execute
> ../../gcc/graphite.c:433

I know.  GRAPHITE people need to look at this, I got lost trying to
fix it myself.

[Bug other/71212] Compilation of gcc (libstdc++) for foreign target platform problem.

2016-05-20 Thread abominable-snowman at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71212

--- Comment #4 from Petr Ovtchenkov  ---
(In reply to Petr Ovtchenkov from comment #3)
>
> ...

Is following still actual?

  # This lets us hard-code the functionality we know we'll have in the cross
  # target environment.  "Let" is a sugar-coated word placed on an especially
  # dull and tedious hack, actually.
  #
  # Here's why GLIBCXX_CHECK_MATH_SUPPORT, and other autoconf macros
  # that involve linking, can't be used:
  #"cannot open sim-crt0.o"
  #"cannot open crt0.o"
  # etc.  All this is because there currently exists no unified, consistent
  # way for top level CC information to be passed down to target directories:
  # newlib includes, newlib linking info, libgloss versus newlib crt0.o, etc.
  # When all of that is done, all of this hokey, excessive AC_DEFINE junk for
  # crosses can be removed.

  # If Canadian cross, then don't pick up tools from the build directory.
  # Used only in GLIBCXX_EXPORT_INCLUDES.
  if test -n "$with_cross_host" &&
 test x"$build_alias" != x"$with_cross_host" &&
 test x"$build" != x"$target";
  then
CANADIAN=yes
  else
CANADIAN=no
  fi


Related commits are:

43390bfe2 libstdc++-v3/configure.in (pme2002-06-18 19:07:12 + 265)
...
68224f8df libstdc++-v3/configure.in (pme2003-08-05 02:00:18 + 281)
5495d2507 libstdc++-v3/configure.ac (amodra 2003-08-28 00:24:52 + 282)
...
b9e8095bd libstdc++-v3/configure.in (bkoz   2000-04-21 20:33:34 + 285)

[Bug fortran/71196] f951: internal compiler error: in gfc_conv_string_init, at fortran/trans-const.c:149

2016-05-20 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71196

--- Comment #3 from Dominique d'Humieres  ---
Related to pr67804 (ICE at the same line) and pr68569 (ICE at the next line).

[Bug tree-optimization/69720] [4.9/5 Regression] wrong code at -O3 on x86_64-linux-gnu

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69720

--- Comment #7 from Richard Biener  ---
Author: rguenth
Date: Fri May 20 13:03:19 2016
New Revision: 236510

URL: https://gcc.gnu.org/viewcvs?rev=236510&root=gcc&view=rev
Log:
2016-05-20  Richard Biener  

Backport from mainline
2016-02-29  Richard Biener  

PR tree-optimization/69720
* tree-vect-loop.c (get_initial_def_for_reduction): Avoid
the adjustment_def path for possibly vectorized defs.
(vect_create_epilog_for_reduction): Handle vectorized initial
defs properly.

* gcc.dg/vect/vect-outer-pr69720.c: New testcase.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.dg/vect/vect-outer-pr69720.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/tree-vect-loop.c

[Bug target/67278] [4.9/5 Regression] ICE: verify_gimple failed on darwin 14.5 x86_64

2016-05-20 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67278

--- Comment #14 from Richard Biener  ---
Author: rguenth
Date: Fri May 20 13:24:29 2016
New Revision: 236512

URL: https://gcc.gnu.org/viewcvs?rev=236512&root=gcc&view=rev
Log:
2016-05-20  Richard Biener  

Backport from mainline
2016-03-02  Richard Biener  

PR middle-end/67278
* tree-cfg.c (verify_expr): Adjust BIT_FIELD_REF case.

* gcc.dg/simd-7.c: New testcase.

2016-03-02  Richard Biener  
Uros Bizjak  

PR target/67278
* config/i386/i386.c (type_natural_mode): Handle XFmode vectors.

* gcc.dg/simd-8.c: New testcase.

2016-03-09  Jakub Jelinek  

PR middle-end/67278
* gcc.dg/simd-7.c: Add -w -Wno-psabi to dg-options.

PR target/67278
* gcc.dg/simd-8.c: Add -w -Wno-psabi to dg-options.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.dg/simd-7.c
branches/gcc-5-branch/gcc/testsuite/gcc.dg/simd-8.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/i386/i386.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/tree-cfg.c

[Bug c++/71166] [6/7 Regression] ICE with nested constexpr/initializer

2016-05-20 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71166

--- Comment #4 from Nathan Sidwell  ---
build_vec_init_elt (tree.c) says:

/* Subroutine of build_vec_init_expr: Build up a single element
   intialization as a proxy for the full array initialization to get things
   marked as used and any appropriate diagnostics.

   Since we're deferring building the actual constructor calls until
   gimplification time, we need to build one now and throw it away so
   that the relevant constructor gets mark_used before cgraph decides
   what functions are needed.  Here we assume that init is either
   NULL_TREE, void_type_node (indicating value-initialization), or
   another array to copy.  */

With constexprs now in play, that appears to be an incorrect approach.   I'm
not sure why it's even sensible to go building things early only to throw them
away and redo it.  It would seem better to just build the constructor (or
whatever) tree and keep it.

[Bug middle-end/69526] ivopts candidate strangeness

2016-05-20 Thread rdapp at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69526

--- Comment #13 from rdapp at linux dot vnet.ibm.com ---
Created attachment 38535
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38535&action=edit
VRP/match.pd patch

Found some time again and hacked together a fix for match.pd and VRP. The patch
exports a VRP function no_range_overflow that is called from match.pd via
tree.c. I realize that VRP didn't export any functions so far and if there's a
better/idiomatic way to do it, please tell me. Further improvements or "code
smell" hints very welcome.

Currently this should fix cases like

long foo(int i)
{
  return (long) (i + 1) - 2;
}

Commutativity of a PLUS_EXPR is not yet being exploited and I'm relying on
TYPE_OVERFLOW_UNDEFINED so far. The overflow checking could also be done more
elegantly I suppose.

This diff is extracted from the full patch which also includes the RTL level
fix which I haven't included here since it has not changed. I hope the
splitting didn't introduce new bugs but there are no regressions on s390x for
the full patch.

[Bug target/71070] MPX gives a false positive when allocating a string longer than 16 bytes on the stack

2016-05-20 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71070

Ilya Enkovich  changed:

   What|Removed |Added

 CC||ienkovich at gcc dot gnu.org

--- Comment #1 from Ilya Enkovich  ---
Couldn't reproduce with these versions:

gcc version 7.0.0 20160520
gcc version 6.1.1 20160520
gcc version 5.3.1 20160520

I always get output:

short string: short string
Allocated a big object
long string: I'm a long string. My size is bigger than 16 bytes

Compilation string used:

g++ pr71070.C -mmpx -fcheck-pointer-bounds -O3

[Bug gcov-profile/67937] gcov gives wrong results when negative counts are involved

2016-05-20 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67937

Jan Hubicka  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-05-20
 CC||hubicka at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |hubicka at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #5 from Jan Hubicka  ---
I will take a look.

[Bug gcov-profile/67992] GCOV takes an absurdly long time to process a file

2016-05-20 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67992

Jan Hubicka  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-05-20
 CC||hubicka at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |hubicka at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #6 from Jan Hubicka  ---
I will take a look.  The algorithm choosing minimal spanning tree can be
adjusted to make the solving algorithm converge faster. I will need to re-think
the details. It is well over a decade.

[Bug gcov-profile/67992] GCOV takes an absurdly long time to process a file

2016-05-20 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67992

--- Comment #7 from Jan Hubicka  ---
Joshua: gcov is seriously old tool. There is quite some need to handle profile
in more generic matter (for autoFDO/LTO and other cases). So if you have more
flexible implementation, it would make sense to replace it ;))

[Bug gcov-profile/67937] gcov gives wrong results when negative counts are involved

2016-05-20 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67937

--- Comment #6 from Jan Hubicka  ---
We can have negative counters on fake edges in case the code uses abnormal
edges that we can't instrument correctly.  setjmp/longjmp is one of examples. 
If you profile kernel, you will have inconsistencies in profile because of race
conditions.

[Bug c++/71192] Coredump - SIGSEGV exception handling on GCC 4.8.2 in Solaris 11.3, Solaris 11.2 works with same GCC version

2016-05-20 Thread user1172464 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71192

user1172464 at gmail dot com changed:

   What|Removed |Added

   Severity|normal  |major

--- Comment #1 from user1172464 at gmail dot com ---
Hi, could you please share some thoughts on what we need to look into across
the environments to help narrow down this issue?
If you could at least shed some lights that would be very much appreciated.

Thanks in advance,
Mike

[Bug target/71208] [6 regression] mmix: C++ code fails to link

2016-05-20 Thread yselkowi at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71208

Yaakov Selkowitz  changed:

   What|Removed |Added

   See Also||https://sourceware.org/bugz
   ||illa/show_bug.cgi?id=20125

--- Comment #2 from Yaakov Selkowitz  ---
(In reply to Richard Biener from comment #1)
> Note this still looks like a binutils issue, so please report it against
> binutils as well.

Done: https://sourceware.org/bugzilla/show_bug.cgi?id=20125

Note that reverting to binutils 2.25.1 does not help either.

[Bug tree-optimization/68030] Redundant address calculations in vectorized loop

2016-05-20 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68030

--- Comment #9 from amker at gcc dot gnu.org ---
I had a patch for this, will send for review.

[Bug c++/70634] [4.9/5 Regression] ICE on valid code on x86_64-linux-gnu: Segmentation fault (program cc1plus)

2016-05-20 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70634

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #5 from Jason Merrill  ---
I'm nervous about backporting this patch, so I'm inclined to leave it unfixed
in 4.9 and 5.  Any objection?

[Bug c++/70634] [4.9/5 Regression] ICE on valid code on x86_64-linux-gnu: Segmentation fault (program cc1plus)

2016-05-20 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70634

--- Comment #6 from Jason Merrill  ---
Created attachment 38536
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38536&action=edit
patch for gcc 5

Here's the patch if anyone wants to build their own gcc 5 with this fixed.

[Bug testsuite/52563] FAIL: gcc.dg/tree-ssa/scev-[3,4].c scan-tree-dump-times optimized "&a" 1

2016-05-20 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52563

amker at gcc dot gnu.org changed:

   What|Removed |Added

 CC||amker at gcc dot gnu.org

--- Comment #14 from amker at gcc dot gnu.org ---
(In reply to rguent...@suse.de from comment #13)
> On Fri, 20 May 2016, andre.simoesdiasvieira at arm dot com wrote:
> 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52563
> > 
> > Andre Vieira  changed:
> > 
> >What|Removed |Added
> > 
> >  CC||andre.simoesdiasvieira@arm.
> >||com
> > 
> > --- Comment #12 from Andre Vieira  
> > ---
> > Same regression observed on arm-none-eabi.
> 
> Note the scanning is for final value replacement and it seems IVO now
> has an initial value using &a as well.  So maybe instead scan the
> scev-ccp dump.

Haven't looked into it, but the use of &a in initial value is intended?  Looks
like sccp failed to propagate last value of induction variable to a_p.

[Bug testsuite/52563] FAIL: gcc.dg/tree-ssa/scev-[3,4].c scan-tree-dump-times optimized "&a" 1

2016-05-20 Thread andre.simoesdiasvieira at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52563

--- Comment #15 from Andre Vieira  ---
So the code change for sccp moves the following sequence out of the loop:

  _2 = (sizetype) i_30;
  _3 = _2 * 8;
  _10 = _3 + 4;
  _1 = &a + _10;
  a_p = _1;

This is basically: 
*a_p = &a[last_i].y;

I agree that that makes sense, were it not for the fact that sequence is
recomputing the address of a[i].y which is already computed inside the loop
for:

MEM[(int *)&a][i_11].y = 100;

When IVOPTS comes around it creates a code sequence similar to this one to
calculate the address it writes 100 to, and you end up with a needless
recomputation of the address.

Now I don't know what phase should be responsible for cleaning this up, whether
its sccp's responsibility to realize that the address computation is the same,
or whether there should be some sort of common sub-expression elimination step
in between or something else.

[Bug c++/70634] [4.9/5 Regression] ICE on valid code on x86_64-linux-gnu: Segmentation fault (program cc1plus)

2016-05-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70634

--- Comment #7 from Jakub Jelinek  ---
No objections from me.

[Bug testsuite/52563] FAIL: gcc.dg/tree-ssa/scev-[3,4].c scan-tree-dump-times optimized "&a" 1

2016-05-20 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52563

--- Comment #16 from amker at gcc dot gnu.org ---
(In reply to Andre Vieira from comment #15)
> So the code change for sccp moves the following sequence out of the loop:
> 
>   _2 = (sizetype) i_30;
>   _3 = _2 * 8;
>   _10 = _3 + 4;
>   _1 = &a + _10;
>   a_p = _1;
> 
> This is basically: 
> *a_p = &a[last_i].y;
> 
> I agree that that makes sense, were it not for the fact that sequence is
> recomputing the address of a[i].y which is already computed inside the loop
> for:
> 
> MEM[(int *)&a][i_11].y = 100;
> 
> When IVOPTS comes around it creates a code sequence similar to this one to
> calculate the address it writes 100 to, and you end up with a needless
> recomputation of the address.
> 
> Now I don't know what phase should be responsible for cleaning this up,
> whether its sccp's responsibility to realize that the address computation is
> the same, or whether there should be some sort of common sub-expression
> elimination step in between or something else.

Passes have been reordered recently.  After that, sink pass runs after lim will
sink the computation to loop exit.  also there is no pass cleaning it up.
Before reordering, assignment to a_p isn't lsm out of loop, there is nothing
for sink pass to sink.

[Bug target/70738] Add -mgeneral-regs-only option

2016-05-20 Thread hjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70738

--- Comment #2 from hjl at gcc dot gnu.org  ---
Author: hjl
Date: Fri May 20 16:06:39 2016
New Revision: 236520

URL: https://gcc.gnu.org/viewcvs?rev=236520&root=gcc&view=rev
Log:
Add -mgeneral-regs-only option

X86 Linux kernel is compiled only with integer instructions.  Currently,

-mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -mno-80387
-mno-fp-ret-in-387  -mskip-rax-setup

is used to compile kernel.  If we add another non-integer feature, it
has to be turned off.  We can add a -mgeneral-regs-only option, similar
to AArch64, to disable all non-integer features so that kernel doesn't
need a long list and the same option will work for future compilers.
It can also be used to compile interrupt handler.

gcc/

PR target/70738
* common/config/i386/i386-common.c
(OPTION_MASK_ISA_GENERAL_REGS_ONLY_UNSET): New.
(ix86_handle_option): Disable MPX, MMX, SSE and x87 instructions
for -mgeneral-regs-only.
* config/i386/i386.c (ix86_option_override_internal): Don't
enable x87 instructions if only the general registers are
allowed.
* config/i386/i386.opt: Add -mgeneral-regs-only.
* doc/invoke.texi: Document -mgeneral-regs-only.

gcc/testsuite/

PR target/70738
* gcc.target/i386/pr70738-1.c: Likewise.
* gcc.target/i386/pr70738-2.c: Likewise.
* gcc.target/i386/pr70738-3.c: Likewise.
* gcc.target/i386/pr70738-4.c: Likewise.
* gcc.target/i386/pr70738-5.c: Likewise.
* gcc.target/i386/pr70738-6.c: Likewise.
* gcc.target/i386/pr70738-7.c: Likewise.
* gcc.target/i386/pr70738-8.c: Likewise.
* gcc.target/i386/pr70738-9.c: Likewise.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr70738-1.c
trunk/gcc/testsuite/gcc.target/i386/pr70738-2.c
trunk/gcc/testsuite/gcc.target/i386/pr70738-3.c
trunk/gcc/testsuite/gcc.target/i386/pr70738-4.c
trunk/gcc/testsuite/gcc.target/i386/pr70738-5.c
trunk/gcc/testsuite/gcc.target/i386/pr70738-6.c
trunk/gcc/testsuite/gcc.target/i386/pr70738-7.c
trunk/gcc/testsuite/gcc.target/i386/pr70738-8.c
trunk/gcc/testsuite/gcc.target/i386/pr70738-9.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/common/config/i386/i386-common.c
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/i386.opt
trunk/gcc/doc/invoke.texi
trunk/gcc/testsuite/ChangeLog

[Bug target/70738] Add -mgeneral-regs-only option

2016-05-20 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70738

H.J. Lu  changed:

   What|Removed |Added

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

--- Comment #3 from H.J. Lu  ---
Fixed for 7.0.

[Bug target/71070] MPX gives a false positive when allocating a string longer than 16 bytes on the stack

2016-05-20 Thread alexo_o at ukr dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71070

--- Comment #2 from Oleksii Oleksenko  ---
Sorry, I guess, I had a wrong configuration. I had the CHKP_RT_BNDPRESERVE
variable set to '1', and after I tried setting it to '0', the problem
dissipated.

[Bug c++/70572] [4.9/5/6/7 Regression] ICE on code with decltype (auto) on x86_64-linux-gnu in digest_init_r, at cp/typeck2.c:1103 with -std=c++14

2016-05-20 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70572

--- Comment #3 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Fri May 20 16:24:58 2016
New Revision: 236522

URL: https://gcc.gnu.org/viewcvs?rev=236522&root=gcc&view=rev
Log:
/cp
2016-05-20  Paolo Carlini  

PR c++/70572
* decl.c (cp_finish_decl): Check do_auto_deduction return value
and return immediately in case of erroneous code.

/testsuite
2016-05-20  Paolo Carlini  

PR c++/70572
* g++.dg/cpp1y/auto-fn31.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/auto-fn31.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/70572] [4.9/5/6 Regression] ICE on code with decltype (auto) in digest_init_r, at cp/typeck2.c:1103 with -std=c++14

2016-05-20 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70572

Paolo Carlini  changed:

   What|Removed |Added

Summary|[4.9/5/6/7 Regression] ICE  |[4.9/5/6 Regression] ICE on
   |on code with decltype   |code with decltype (auto)
   |(auto) on x86_64-linux-gnu  |in digest_init_r, at
   |in digest_init_r, at|cp/typeck2.c:1103 with
   |cp/typeck2.c:1103 with  |-std=c++14
   |-std=c++14  |

--- Comment #4 from Paolo Carlini  ---
Fixed in trunk so far.

[Bug testsuite/52563] FAIL: gcc.dg/tree-ssa/scev-[3,4].c scan-tree-dump-times optimized "&a" 1

2016-05-20 Thread andre.simoesdiasvieira at arm dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52563

--- Comment #17 from Andre Vieira  ---
Ah yes my bad, its not sccp doing it... got a bit confused there... It is
indeed sink that moves that sequence down. Sorry for the noise.

Question remains on how to clean this up though. Ideally you would like to end
up with

a_p = ;
outside of the loop.

[Bug c++/70528] [5 Regression] bogus error: constructor required before non-static data member

2016-05-20 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70528

Jason Merrill  changed:

   What|Removed |Added

 CC||redi at gcc dot gnu.org

--- Comment #15 from Jason Merrill  ---
How important is it to fix this in GCC 5?

[Bug c++/51488] ICE on infinite template recursion

2016-05-20 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51488

Jason Merrill  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #7 from Jason Merrill  ---
Paolo, this doesn't seem to have been fixed by your patch for bug 70635.

[Bug c++/71213] New: ICE on invalid code

2016-05-20 Thread rippey.e at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71213

Bug ID: 71213
   Summary: ICE on invalid code
   Product: gcc
   Version: 6.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rippey.e at gmail dot com
  Target Milestone: ---

Running g++ 6.1.0 with no arguments on the following program:

#1""3
template
class C;

template
operator<(const,C){
operator<

produces this error message:

: In function ‘int operator<(int, C)’:
:6:10: internal compiler error: in cp_lexer_peek_nth_token, at cp/parser.c:1055
0x67cd62 cp_lexer_peek_nth_token
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:1055
0x699e1b cp_parser_template_id
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:14841
0x69b03a cp_parser_type_name
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:16376
0x68ca51 cp_parser_type_name
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:16347
0x68ca51 cp_parser_simple_type_specifier
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:16261
0x688ecd cp_parser_type_specifier
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:15914
0x69a9fc cp_parser_decl_specifier_seq
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:12760
0x6a4c41 cp_parser_simple_declaration
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:12301
0x6a50ba cp_parser_block_declaration
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:12248
0x6a5a29 cp_parser_declaration_statement
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:11860
0x6a2d3c cp_parser_statement
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:10528
0x6a33a4 cp_parser_statement_seq_opt
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:10806
0x6a347f cp_parser_compound_statement
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:10760
0x6a3593 cp_parser_function_body
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:20685
0x6a3593 cp_parser_ctor_initializer_opt_and_function_body
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:20721
0x6a3e10 cp_parser_function_definition_after_declarator
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:25383
0x6a4b7b cp_parser_function_definition_from_specifiers_and_declarator
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:25295
0x6a4b7b cp_parser_init_declarator
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:18457
0x6a5d3f cp_parser_single_declaration
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:25836
0x6a5e2c cp_parser_template_declaration_after_parameters
/disk/0/erippey/gcc/objdir/../gcc-6.1.0/gcc/cp/parser.c:25444
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug fortran/69368] [6 Regression] spec2006 test case 416.gamess fails with the g++ 6.0 compiler starting with r232508

2016-05-20 Thread mike at vermeulen dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69368

Mike Vermeulen  changed:

   What|Removed |Added

 CC||mike at vermeulen dot com

--- Comment #91 from Mike Vermeulen  ---
This problem appears to have reappeared in GCC 7 trunk.

Looking at the performance results posted at:
http://gcc.opensuse.org/SPEC/CFP/sb-megrez-head-64-2006/recent.html suggests
the problem reappeared somewhere around May 4th.

416.gamess also fails with latest gcc-7-20160515 snapshot despite adding the
-funconstrained-commons flag.

[Bug c++/51488] ICE on infinite template recursion

2016-05-20 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51488

--- Comment #8 from Paolo Carlini  ---
Frankly I didn't have high expectations ;) But certainly we should do something
about all these pretty old bugs about infinite template recursions which we are
not catching.

[Bug fortran/69368] [6 Regression] spec2006 test case 416.gamess fails with the g++ 6.0 compiler starting with r232508

2016-05-20 Thread mike at vermeulen dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69368

--- Comment #92 from Mike Vermeulen  ---
Passes with snapshot: gcc-7-20160501
Fails with snapshot: gcc-7-20160508

[Bug fortran/71204] [5/6/7 Regression] ICE with -O0 in expand_expr_real_1, at expr.c:9651

2016-05-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71204

--- Comment #3 from Jakub Jelinek  ---
Author: jakub
Date: Fri May 20 18:49:24 2016
New Revision: 236525

URL: https://gcc.gnu.org/viewcvs?rev=236525&root=gcc&view=rev
Log:
PR fortran/71204
* frontend-passes.c (realloc_string_callback): Clear inserted_block
and changed_statement before calling create_var.

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

Added:
trunk/gcc/testsuite/gfortran.dg/pr71204.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/frontend-passes.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/71204] [5/6/7 Regression] ICE with -O0 in expand_expr_real_1, at expr.c:9651

2016-05-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71204

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Fri May 20 18:52:38 2016
New Revision: 236526

URL: https://gcc.gnu.org/viewcvs?rev=236526&root=gcc&view=rev
Log:
PR fortran/71204
* frontend-passes.c (realloc_string_callback): Clear inserted_block
and changed_statement before calling create_var.

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

Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/pr71204.f90
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/frontend-passes.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug fortran/71204] [5/6/7 Regression] ICE with -O0 in expand_expr_real_1, at expr.c:9651

2016-05-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71204

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Fri May 20 19:00:54 2016
New Revision: 236528

URL: https://gcc.gnu.org/viewcvs?rev=236528&root=gcc&view=rev
Log:
PR fortran/71204
* frontend-passes.c (realloc_string_callback): Clear inserted_block
and changed_statement before calling create_var.

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

Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/pr71204.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/frontend-passes.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug fortran/71204] [5/6/7 Regression] ICE with -O0 in expand_expr_real_1, at expr.c:9651

2016-05-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71204

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #6 from Jakub Jelinek  ---
Fixed.

[Bug c++/71210] [6/7 Regression] internal compiler error: in assign_temp, at function.c:961

2016-05-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71210

--- Comment #3 from Jakub Jelinek  ---
Author: jakub
Date: Fri May 20 19:06:09 2016
New Revision: 236529

URL: https://gcc.gnu.org/viewcvs?rev=236529&root=gcc&view=rev
Log:
PR c++/71210
* gimple-fold.c (gimple_fold_call): Do not remove lhs of noreturn
calls if the LHS is variable length or has addressable type.
If targets[0]->decl is a noreturn call with void return type and
zero arguments, adjust fntype and remove lhs in that case.

* g++.dg/opt/pr71210-1.C: New test.
* g++.dg/opt/pr71210-2.C: New test.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/opt/pr71210-1.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/opt/pr71210-2.C
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/gimple-fold.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug c++/70466] [ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real, at cp/call.c:6371 with -std=c++11

2016-05-20 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70466

--- Comment #8 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Fri May 20 19:09:59 2016
New Revision: 236530

URL: https://gcc.gnu.org/viewcvs?rev=236530&root=gcc&view=rev
Log:
/cp
2016-05-20  Paolo Carlini  

PR c++/70466
* call.c (convert_like_real): Check that we are actually converting
from an init list.

/testsuite
2016-05-20  Paolo Carlini  

PR c++/70466
* g++.dg/template/pr70466-1.C: New.
* g++.dg/template/pr70466-2.C: Likewise.

Added:
branches/gcc-5-branch/gcc/testsuite/g++.dg/template/pr70466-1.C
branches/gcc-5-branch/gcc/testsuite/g++.dg/template/pr70466-2.C
Modified:
branches/gcc-5-branch/gcc/cp/ChangeLog
branches/gcc-5-branch/gcc/cp/call.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug c++/71210] [6/7 Regression] internal compiler error: in assign_temp, at function.c:961

2016-05-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71210

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #4 from Jakub Jelinek  ---
Fixed.

[Bug sanitizer/70712] False positive from AddressSanitizer with use of 'alignas'

2016-05-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70712

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #7 from Jakub Jelinek  ---
Fixed.

[Bug c++/70466] [ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real, at cp/call.c:6371 with -std=c++11

2016-05-20 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70466

Paolo Carlini  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
Version|6.0 |5.4.0
 Resolution|--- |FIXED
   Assignee|paolo.carlini at oracle dot com|unassigned at gcc dot 
gnu.org

--- Comment #9 from Paolo Carlini  ---
Fixed for 5.4 too.

[Bug c++/71214] New: Typo in feature test macro for rvalue references

2016-05-20 Thread trprince at synopsys dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71214

Bug ID: 71214
   Summary: Typo in feature test macro for rvalue references
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trprince at synopsys dot com
  Target Milestone: ---

According to P0096R2
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0096r2.html) the
feature test macro for C++11 rvalue references should be
'__cpp_rvalue_references'. However, GCC uses '__cpp_rvalue_reference' (note the
missing 's').

$ g++ -std=c++11 -dM -E -xc++ /dev/null | grep __cpp_rvalue
#define __cpp_rvalue_reference 200610
$ 

Clang and EDG both use the plural version:

$ clang++ -std=c++11 -dM -E -xc++ /dev/null | grep __cpp_rvalue
#define __cpp_rvalue_references 200610
$ edgcpfe-4.11 --c++11 --list_macros - < /dev/null | grep __cpp_rvalue
#define __cpp_rvalue_references 200610
$ 

I've tested and reproduced this behavior as far back as 4.9.2 which I believe
is around the time the feature test macros were originally introduced.

[Bug fortran/66461] [4.9/5/6/7 Regression] ICE on missing end program in fixed source

2016-05-20 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66461

--- Comment #14 from Jerry DeLisle  ---
(In reply to Dominique d'Humieres from comment #13)
--- snip ---
> 
> Although I partially agree with that, I don't understand why
> 
>  if ( x(1) < 0 .or.  &
>  x(2) < 0 ) print *, x
> 
> does not trigger any matching error in free form, while
> 
>  if ( x(1) < 0 .or.
>  &x(2) < 0 ) print *, x
> 
> does in fixed form. IMO there is latent bug in the parser.

I dont think in the parser.  I agree this is an odd duck.  Theoretically
continuation markers are removed and the parser only sees one line.  One
difference between fixed and free is that fixed lines are padded out to the
max-line-length with spaces.

Another odd thing I found is on or about scanner.c:1530 is this:

  if (c == '0' || c == ' ' || c == '\n')

What is the significance of a zero digit in that position.  Is this some old
syntax.  I have deleted it and also tried changing it to '\0', as in NULL, but
it has no effect on the problem at hand or the testsuite.

Also when an unexpected end of file is encountered, the locus is backed up one
line.  It could be that one line is trying to be parsed a second time and
giving the error. I have not had time to try additional debuggery. This gets
into an area we engineers call the $#!t to worth ratio. ;)

[Bug tree-optimization/70884] [6/7 regression] 2nd SRA pass confused by load from constant pool

2016-05-20 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70884

--- Comment #7 from Martin Jambor  ---
Author: jamborm
Date: Fri May 20 21:04:31 2016
New Revision: 236544

URL: https://gcc.gnu.org/viewcvs?rev=236544&root=gcc&view=rev
Log:
[PR 70884] Constant pool SRA fix

2016-05-20  Martin Jambor  

PR tree-optimization/70884
* tree-sra.c (initialize_constant_pool_replacements): Do not check
should_scalarize_away_bitmap and cannot_scalarize_away_bitmap bits.
(sort_and_splice_var_accesses): Do not consider multiple scalar reads
of constant pool data as a reason for scalarization.

testsuite/
* gcc.dg/tree-ssa/pr70919.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr70919.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-sra.c

[Bug libstdc++/55917] Impossible to find/debug unhandled exceptions in an std::thread

2016-05-20 Thread howard.hinnant at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55917

Howard Hinnant  changed:

   What|Removed |Added

 CC||howard.hinnant at gmail dot com

--- Comment #14 from Howard Hinnant  ---
The main function is not wrapped in a try / catch and an unhandled exception on
the main thread still calls std::terminate() as required.

I believe that gcc already correctly implements the call to std::terminate()
for threads elsewhere, and with the same code that it does for main.  It is in
the function __cxa_throw, implemented by libsupc++.  Here is the specification:

http://mentorembedded.github.io/cxx-abi/abi-eh.html#cxx-throw

which says in part:

> __Unwind_RaiseException begins the process of stack unwinding, described in 
> Section 2.5. In special cases, such as an inability to find a handler, 
> _Unwind_RaiseException may return. In that case, __cxa_throw will call 
> terminate, assuming that there was no handler for the exception.

And here is where it is implemented:

https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/libsupc%2B%2B/eh_throw.cc#L87

As long as libsupc++ is being used on the platform, I think you are good to
remove the try/catch from execute_native_thread_routine.

Fwiw, this is what is done on libc++ / libc++abi (no try/catch at the top of
std::thread, and let __cxa_throw call terminate).  We get beautiful stack dumps
from threaded code over there. :-)

[Bug other/71212] Compilation of gcc (libstdc++) for foreign target platform problem.

2016-05-20 Thread abominable-snowman at yandex dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71212

--- Comment #5 from Petr Ovtchenkov  ---
Created attachment 38537
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38537&action=edit
patch that fix issue

This changes fix issue for me. But I know nothing what CANADIAN ad-hoc
workaround intended (suspicious, as for me).

[Bug tree-optimization/70884] [6 regression] 2nd SRA pass confused by load from constant pool

2016-05-20 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70884

Martin Jambor  changed:

   What|Removed |Added

Summary|[6/7 regression] 2nd SRA|[6 regression] 2nd SRA pass
   |pass confused by load from  |confused by load from
   |constant pool   |constant pool

--- Comment #8 from Martin Jambor  ---
Fixed on trunk so far, gcc-6 branch testing is in progress.

[Bug c/71115] [4.9/5/6/7 Regression] Missing warning: excess elements in struct initializer

2016-05-20 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71115

--- Comment #10 from Martin Sebor  ---
Author: msebor
Date: Fri May 20 22:23:10 2016
New Revision: 236549

URL: https://gcc.gnu.org/viewcvs?rev=236549&root=gcc&view=rev
Log:
PR c/71115 - [4.9/5/6/7 Regression] Missing warning: excess elements
in struct initializer

gcc/c/ChangeLog:
2016-05-20  Martin Sebor  

PR c/71115
* c-typeck.c (error_init): Use
expansion_point_location_if_in_system_header.
(warning_init): Same.

gcc/testsuite/ChangeLog:
2016-05-20  Martin Sebor  

PR c/71115
* gcc.dg/init-excess-2.c: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-sfinae.C
trunk/gcc/testsuite/gcc.dg/init-excess-2.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-typeck.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/Woverride-init-1.c
trunk/gcc/testsuite/gcc.dg/Woverride-init-2.c

[Bug c/71115] [4.9/5/6 Regression] Missing warning: excess elements in struct initializer

2016-05-20 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71115

Martin Sebor  changed:

   What|Removed |Added

   Keywords||diagnostic
  Known to work||7.0
Summary|[4.9/5/6/7 Regression]  |[4.9/5/6 Regression]
   |Missing warning: excess |Missing warning: excess
   |elements in struct  |elements in struct
   |initializer |initializer
  Known to fail|7.0 |

--- Comment #11 from Martin Sebor  ---
Fix commtted to trunk in r236549. (The constexpr-sfinae.C test shouldn't have
been part of this commit but it doesn't fail except with 4.9.3.)

[Bug c++/71215] New: Compile error when using in-class initialization of template class attributes (c++11)

2016-05-20 Thread markprediger at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71215

Bug ID: 71215
   Summary: Compile error when using in-class initialization of
template class attributes (c++11)
   Product: gcc
   Version: 5.3.0
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: markprediger at gmail dot com
  Target Milestone: ---

I can reproduce the bug on any gcc from version 4.7.3 to 5.3.0. gcc 6 seems not
to be affected.

Code (test.cpp):

class x {};

template
class Member {};

class Object {
Member str = Member(); // <- line 7
};

int main()
{
}


Command line:

g++ test.cpp -std=c++11


Error:

test.cpp:7:31: error: expected ';' at end of member declaration
  Member str = Member();
   ^
test.cpp:7:32: error: expected unqualified-id before '>' token
  Member str = Member();
^
test.cpp:7:28: error: wrong number of template arguments (1, should be 2)
  Member str = Member();
^
test.cpp:4:7: note: provided for 'template class Member'
 class Member {};


If you replace x with a primitive type, no error occures.
Also compiles with gcc 6.

[Bug target/71216] New: Incorrect PPC assembly due to inserted .machine pseudo-op

2016-05-20 Thread gcc at jbirnbaum dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71216

Bug ID: 71216
   Summary: Incorrect PPC assembly due to inserted .machine
pseudo-op
   Product: gcc
   Version: 6.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gcc at jbirnbaum dot com
  Target Milestone: ---

This report concerns rs6000_file_start() in config/rs6000/rs6000.c as modified
by r219854

I'm working with the PowerPC 405 but I believe this affects a number of
different chips.

GCC version info:
Target: powerpc-softfloat-linux
Configured with: ../gcc-6.1.0/configure --prefix=/toolchains/gcc-6.1.0-powerpc
--build=i386-pc-linux-gnu --host=i386-pc-linux-gnu
--target=powerpc-softfloat-linux --enable-languages=c,c++ --disable-nls
--without-headers --disable-__cxa_atexit
Thread model: posix
gcc version 6.1.0 (GCC)

Simple C file used for testing:
int main ()
{
unsigned tcr = 5;
   __asm__ volatile (
"   mttcr   %0  \n"
: /* no output */
: "r"( tcr )
);


return 0;
}

Compiled using powerpc-softfloat-linux-gcc -mcpu=405 -mregnames -nostdlib
-nodefaultlibs filename.c

objdump -d yields:
a.out: file format elf32-powerpc


Disassembly of section .text:

1074 :
1074:   94 21 ff e0 stwur1,-32(r1)
1078:   93 e1 00 1c stw r31,28(r1)
107c:   7c 3f 0b 78 mr  r31,r1
1080:   39 20 00 05 li  r9,5
1084:   91 3f 00 08 stw r9,8(r31)
1088:   81 3f 00 08 lwz r9,8(r31)
108c:   7d 3a f3 a6 mtspr   340,r9
1090:   39 20 00 00 li  r9,0
1094:   7d 23 4b 78 mr  r3,r9
1098:   39 7f 00 20 addir11,r31,32
109c:   83 eb ff fc lwz r31,-4(r11)
10a0:   7d 61 5b 78 mr  r1,r11
10a4:   4e 80 00 20 blr

The "mtspr 340" part should be "mtspr 986" since the PowerPC 405 does not use
the PowerPC Book E SPRN register numbers.

Using -save-temps I see the following assembly
.file   "filename.c"
.machine ppc
.section".text"
.align 2
.globl main
.type   main, @function
main:
stwu 1,-32(1)
stw 31,28(1)
mr 31,1
li 9,5
stw 9,8(31)
lwz 9,8(31)
#APP
 # 4 "filename.c" 1
   mttcr   9

 # 0 "" 2
#NO_APP
li 9,0
mr 3,9
addi 11,31,32
lwz 31,-4(11)
mr 1,11
blr
.size   main, .-main
.ident  "GCC: (GNU) 6.1.0"
.section.note.GNU-stack,"",@progbits

Note the ".machine ppc" part which overrides the parameters provided at the as
command line.  In this case using "gcc -v" I saw:
powerpc-softfloat-linux/bin/as -v -m405 -many -mbig -o filename.o filename.s

So instead of -m405 the assember uses the setting of -mppc.  Per
https://sourceware.org/binutils/docs/as/PowerPC_002dOpts.html#PowerPC_002dOpts
this is PowerPC 603/604 assembly and not the requested PowerPC 403/405
assembly.

It appears this would happen for a number of the -m options, since the code in
rs6000.c has .machine ppc as the default if none of the powerN or ppc64
selections apply.

Searching the Internet for related info on this issue for PowerPC 4xx I did
find a related patch:
https://github.com/sba1/adtools/blob/master/gcc/5/patches/0003-Disable-.machine-directive-generation.patch

[Bug c++/71217] New: [concepts] Incorrect recursive concept evaluation

2016-05-20 Thread sergstrukovlink at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71217

Bug ID: 71217
   Summary: [concepts]  Incorrect recursive concept evaluation
   Product: gcc
   Version: 6.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sergstrukovlink at gmail dot com
  Target Milestone: ---

Created attachment 38538
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38538&action=edit
the sample program

The attached file contains a sample program to show the problem.

/* struct Fold */

template  struct Fold;

/* concept TestInt */

template 
struct IntFoldCtor
 {
  enum RetType { Ret = false };
 };

template 
concept bool TestInt = (bool)IntFoldCtor::Ret || is_same::value ;

template 
struct IntFoldCtor >
 {
  enum RetType { Ret = true };
 };

TestInt< Fold,int> > is evaluated (incorrectly) as false.

Here is a link to forum discussion of the problem

https://groups.google.com/a/isocpp.org/forum/#!topic/concepts/k-PFfgLloXI