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

--- Comment #5 from uecker at gcc dot gnu.org ---

The underlying issue appears to be that we somehow do not recognize the struct
as a variable modified type if it has the attribute. The change referenced
above then does not handle size expression correctly which was previously done
in gimplify_parameters (but this was wrong for other reasons).

void e(int c)
{
    goto foo;
    [[maybe_unused]] struct d { [[gnu::vector_size(4)]] char an[c]; } q;
foo:
}

void f(int c)
{
    goto bar;
    [[maybe_unused]] struct d { char an[c]; } q;
bar:
}

https://godbolt.org/z/q76h8xf4K

Reply via email to