[Bug c++/77284] [5/6/7 Regression] ICE on valid C++11 code using initializer list: in potential_constant_expression_1, at cp/constexpr.c:5480
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77284 --- Comment #5 from Marek Polacek --- Author: mpolacek Date: Wed Jan 4 17:47:04 2017 New Revision: 244062 URL: https://gcc.gnu.org/viewcvs?rev=244062=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: trunk/gcc/testsuite/g++.dg/cpp0x/range-for32.C trunk/gcc/testsuite/g++.dg/cpp0x/range-for33.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/constexpr.c trunk/gcc/testsuite/ChangeLog
[Bug c++/77284] [5/6/7 Regression] ICE on valid C++11 code using initializer list: in potential_constant_expression_1, at cp/constexpr.c:5480
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77284 Marek Polacek changed: What|Removed |Added Keywords|error-recovery |ice-on-valid-code Priority|P4 |P3 Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org --- Comment #4 from Marek Polacek --- So let me try that out. The code is valid and it's not error-recovery; resetting the prio to P3.
[Bug c++/77284] [5/6/7 Regression] ICE on valid C++11 code using initializer list: in potential_constant_expression_1, at cp/constexpr.c:5480
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77284 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #3 from Marek Polacek --- I wonder if we should simply --- a/gcc/cp/constexpr.c +++ b/gcc/cp/constexpr.c @@ -5675,6 +5675,9 @@ potential_constant_expression_1 (tree t, bool want_rval, bool strict, return false; } +case CLEANUP_STMT: + return RECUR (CLEANUP_BODY (t), want_rval); + default: if (objc_is_property_ref (t)) return false; which would also fix Bug 77545.
[Bug c++/77284] [5/6/7 Regression] ICE on valid C++11 code using initializer list: in potential_constant_expression_1, at cp/constexpr.c:5480
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77284 --- Comment #2 from Jakub Jelinek --- Richard, this doesn't look like error recovery to me. No error is reported and the sorry isn't meant to be produced for this.
[Bug c++/77284] [5/6/7 Regression] ICE on valid C++11 code using initializer list: in potential_constant_expression_1, at cp/constexpr.c:5480
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77284 Richard Biener changed: What|Removed |Added Priority|P3 |P4
[Bug c++/77284] [5/6/7 Regression] ICE on valid C++11 code using initializer list: in potential_constant_expression_1, at cp/constexpr.c:5480
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77284 Jakub Jelinek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2016-08-18 CC||jakub at gcc dot gnu.org, ||jason at gcc dot gnu.org Target Milestone|--- |5.5 Summary|ICE on valid C++11 code |[5/6/7 Regression] ICE on |using initializer list: in |valid C++11 code using |potential_constant_expressi |initializer list: in |on_1, at|potential_constant_expressi |cp/constexpr.c:5480 |on_1, at ||cp/constexpr.c:5480 Ever confirmed|0 |1 --- Comment #1 from Jakub Jelinek --- Started with r218653.