[Bug c++/97328] [10/11 Regression] ICE in verify_ctor_sanity, at cp/constexpr.c:3995 since r10-7313-gb599bf9d6d1e180d

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Oct 8 18:51:14 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97328

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to Patrick Palka from comment #2)
> When 'storage' is a struct instead of a union, i.e. for the testcase
> 
> template <typename T, int N>
> struct vector {
>     struct storage { 
>         T t; 
>         constexpr  storage() {}
>     } data[N];
> };
> 
> constexpr auto foo() {
>     vector<char, 8> i;
>     return i;
> }
> auto f = foo();
> 
> we started to ICE earlier, since r279019:
> 
>    PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.

Ah.  Feel free to hand this PR to me then (that is, if you don't want it
anymore).


More information about the Gcc-bugs mailing list