[Bug c/94979] gcc-9 generates incorrect code causing segfault

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 7 03:59:40 GMT 2020


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>    if (!j)
                j = (char *[]){"a", "test"};

The scope of the unnamed variable is just in that statement.
So you are using the unnamed variable outside of the scope.

See https://gcc.gnu.org/gcc-9/porting_to.html#complit

See PR 91031 also which is this is a dup of.

*** This bug has been marked as a duplicate of bug 91031 ***


More information about the Gcc-bugs mailing list