https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122836
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
typedef int W __attribute__ ((__vector_size__ (8), __may_alias__));
struct V { __attribute__ ((__vector_size__ (8))) float v[2]; };
void
foo ()
{
W m = *(W *) &(V) { { .v = { 0, 0 } } };
}
Started with r12-7741-g24d51e749570dcb85bd43d3b528f58ad6141de26
Before that it has been rejected with
pr122836.C: In function ‘void foo()’:
pr122836.C:7:41: error: name ‘v’ used in a GNU-style designated initializer for
an array
7 | W m = *(W *) &(V) { { .v = { 0, 0 } } };
| ^
pr122836.C:7:21: error: taking address of rvalue [-fpermissive]
7 | W m = *(W *) &(V) { { .v = { 0, 0 } } };
| ^~~~~~~~~~~~~~~~~~~~~