[Bug c++/84424] [8 Regression] ICE on C++ code: tree check: expected record_type or union_type or qual_union_type, have vector_type in reduced_constant_expression_p, at cp/constexpr.c:1766
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84424 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #4 from Jason Merrill --- Fixed.
[Bug c++/84424] [8 Regression] ICE on C++ code: tree check: expected record_type or union_type or qual_union_type, have vector_type in reduced_constant_expression_p, at cp/constexpr.c:1766
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84424 --- Comment #5 from Jason Merrill --- Author: jason Date: Thu Feb 22 22:50:37 2018 New Revision: 257924 URL: https://gcc.gnu.org/viewcvs?rev=257924=gcc=rev Log: PR c++/84424 - ICE with constexpr and __builtin_shuffle. * constexpr.c (reduced_constant_expression_p): Handle CONSTRUCTOR of VECTOR_TYPE. Added: trunk/gcc/testsuite/g++.dg/ext/vector34.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/constexpr.c
[Bug c++/84424] [8 Regression] ICE on C++ code: tree check: expected record_type or union_type or qual_union_type, have vector_type in reduced_constant_expression_p, at cp/constexpr.c:1766
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84424 Jason Merrill changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
[Bug c++/84424] [8 Regression] ICE on C++ code: tree check: expected record_type or union_type or qual_union_type, have vector_type in reduced_constant_expression_p, at cp/constexpr.c:1766
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84424 Jakub Jelinek changed: What|Removed |Added Status|WAITING |NEW CC||jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek --- I can reproduce with latest trunk too. The ICE is on: 1765 if (CONSTRUCTOR_NO_IMPLICIT_ZERO (t)) 1766field = next_initializable_field (TYPE_FIELDS (TREE_TYPE (t))); 1767 else 1768field = NULL_TREE; where t is: unit-size align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fffefc625e8 precision:32 min max pointer_to_this > V2SI size unit-size align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fffefd72d20 nunits:2> constant tree_1 length:0> created in: 4783 if (AGGREGATE_TYPE_P (type) || VECTOR_TYPE_P (type)) 4784{ 4785 /* In C++14 an NSDMI can participate in aggregate initialization, 4786 and can refer to the address of the object being initialized, so 4787 we need to pass in the relevant VAR_DECL if we want to do the 4788 evaluation in a single pass. The evaluation will dynamically 4789 update ctx.values for the VAR_DECL. We use the same strategy 4790 for C++11 constexpr constructors that refer to the object being 4791 initialized. */ 4792 ctx.ctor = build_constructor (type, NULL); 4793 CONSTRUCTOR_NO_IMPLICIT_ZERO (ctx.ctor) = true; VECTOR_TYPE obviously doesn't have TYPE_FIELDS. I guess we need to teach reduced_constant_expression_p how to handle VECTOR_TYPE constructors.
[Bug c++/84424] [8 Regression] ICE on C++ code: tree check: expected record_type or union_type or qual_union_type, have vector_type in reduced_constant_expression_p, at cp/constexpr.c:1766
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84424 --- Comment #2 from Zhendong Su --- (In reply to Martin Sebor from comment #1) > I can confirm it with r257668 but not with the top of trunk (r257768). The > regression was introduced in r251948. I vaguely remember a bug with a test > case similar to this one go by but I can't find it. Can you please retry > with a newer revision and report back? My latest build is r257757, which still ICEs on this test. I am building the top of the trunk.
[Bug c++/84424] [8 Regression] ICE on C++ code: tree check: expected record_type or union_type or qual_union_type, have vector_type in reduced_constant_expression_p, at cp/constexpr.c:1766
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84424 Martin Sebor changed: What|Removed |Added Keywords||ice-on-valid-code Status|UNCONFIRMED |WAITING Last reconfirmed||2018-02-16 CC||jason at gcc dot gnu.org, ||msebor at gcc dot gnu.org Summary|ICE on C++ code: tree |[8 Regression] ICE on C++ |check: expected record_type |code: tree check: expected |or union_type or|record_type or union_type |qual_union_type, have |or qual_union_type, have |vector_type in |vector_type in |reduced_constant_expression |reduced_constant_expression |_p, at cp/constexpr.c:1766 |_p, at cp/constexpr.c:1766 Ever confirmed|0 |1 --- Comment #1 from Martin Sebor --- I can confirm it with r257668 but not with the top of trunk (r257768). The regression was introduced in r251948. I vaguely remember a bug with a test case similar to this one go by but I can't find it. Can you please retry with a newer revision and report back?