https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123416
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |12.5.0, 13.4.0, 14.3.0,
| |15.2.0
Known to work| |11.5.0
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
The following fails with -O2 -fno-strict-aliasing already.
struct a {
int b;
} c;
int d;
static struct a g() {
int a[2], b, f = 0;
for (; f < 2; f++)
a[f] = 1;
b = a[0];
if (b)
return c;
}
int main() {
c.b = 1;
struct a e = g();
c = g();
if (!c.b || !e.b)
__builtin_abort();
return 0;
}