gcc/testsuite/gcc.dg/c23-tag-composite-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-std=c23" } */ |
| 3 | |
| 4 | |
| 5 | struct foo { int (*(*i)(void))[]; } x; |
| 6 | |
| 7 | |
| 8 | void f(void) |
| 9 | { |
| 10 | const struct foo { int (*(*i)())[3]; } y; |
| 11 | _Static_assert(3 * sizeof(int) == sizeof(*((1 ? &x : &y)->i())), ""); |
| 12 | } |
| 13 | |
| 14 | void g(struct foo { int x; } a); |
| 15 | void g(const struct foo { int x; } a); |
| 16 |