[Bug c++/77284] [5/6 Regression] ICE on valid C++11 code using initializer list: in potential_constant_expression_1, at cp/constexpr.c:5480

2017-01-20 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77284

--- Comment #7 from Marek Polacek  ---
Author: mpolacek
Date: Fri Jan 20 15:12:26 2017
New Revision: 244721

URL: https://gcc.gnu.org/viewcvs?rev=244721=gcc=rev
Log:
PR c++/77545
PR c++/77284
* constexpr.c (potential_constant_expression_1): Handle CLEANUP_STMT.

* g++.dg/cpp0x/range-for32.C: New test.
* g++.dg/cpp0x/range-for33.C: New test.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/cpp0x/range-for32.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/cpp0x/range-for33.C
Modified:
branches/gcc-6-branch/gcc/cp/ChangeLog
branches/gcc-6-branch/gcc/cp/constexpr.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug c++/77284] [5/6 Regression] ICE on valid C++11 code using initializer list: in potential_constant_expression_1, at cp/constexpr.c:5480

2017-01-04 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77284

Marek Polacek  changed:

   What|Removed |Added

Summary|[5/6/7 Regression] ICE on   |[5/6 Regression] ICE on
   |valid C++11 code using  |valid C++11 code using
   |initializer list: in|initializer list: in
   |potential_constant_expressi |potential_constant_expressi
   |on_1, at|on_1, at
   |cp/constexpr.c:5480 |cp/constexpr.c:5480

--- Comment #6 from Marek Polacek  ---
Fixed on trunk so far.