https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122610
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|tree-optimization |middle-end
Target Milestone|15.3 |---
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
struct {
char ary[];
} embed;
So the above definition is the issue. changing it to `[0]` works.
Maybe moderef was not updated for the C23 rules ...
Actually with -pedantic we get an pedwarn:
<source>:26:22: warning: flexible array member in a struct with no named
members is a GCC extension [-Wpedantic]
26 | char ary[];
| ^~~
<source>:28:11: warning: invalid use of structure with flexible array member
[-Wpedantic]
28 | } as;
| ^~