diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/pr33382.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr33382.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr33382.c b/gcc/testsuite/gcc.c-torture/execute/pr33382.c new file mode 100644 index 000000000..ee539643a --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr33382.c @@ -0,0 +1,21 @@ +struct Foo { + int i; + int j[]; +}; + +struct Foo x = { 1, { 2, 0, 2, 3 } }; + +int foo(void) +{ + x.j[0] = 1; + return x.j[1]; +} + +extern void abort(void); + +int main() +{ + if (foo() != 0) + abort(); + return 0; +} |