gcc/testsuite/gcc.dg/pr114493-2.c
raw| 1 | /* PR c/114493 */ |
| 2 | /* { dg-do compile { target lto } } */ |
| 3 | /* { dg-options "-O2 -flto -std=c23" } */ |
| 4 | |
| 5 | void foo (void); |
| 6 | struct S; |
| 7 | struct S bar (struct S **); |
| 8 | struct S qux (const struct S **); |
| 9 | |
| 10 | void |
| 11 | corge (void) |
| 12 | { |
| 13 | struct S { int s; } s; |
| 14 | s.s = 0; |
| 15 | } |
| 16 | |
| 17 | struct __attribute__((__may_alias__)) S { |
| 18 | int s; |
| 19 | }; |
| 20 | |
| 21 | struct S |
| 22 | baz (void) |
| 23 | { |
| 24 | foo (); |
| 25 | return (struct S) {}; |
| 26 | } |