[Bug c++/100489] [10/11/12 Regression] ICE in cp/constexpr.c:3556
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu May 20 21:36:08 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100489
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:
https://gcc.gnu.org/g:a335afe208cd27cf8ee4cb028fb7769700ab6245
commit r10-9857-ga335afe208cd27cf8ee4cb028fb7769700ab6245
Author: Jason Merrill <jason@redhat.com>
Date: Wed May 19 21:12:45 2021 -0400
c++: designated init with anonymous union [PR100489]
My patch for PR98463 added an assert that tripped on this testcase, because
we ended up with a U CONSTRUCTOR with an initializer for a, which is not a
member of U. We need to wrap the a initializer in another CONSTRUCTOR for
the anonymous union.
For the GCC 10 branch, just remove the assert.
PR c++/100489
gcc/cp/ChangeLog:
* constexpr.c (get_or_insert_ctor_field): Remove assert.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/desig18.C: New test.
More information about the Gcc-bugs
mailing list