diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index acd3b439d64..85801a82b72 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-10-14 Andrew Pinski + + PR middle-end/16567 + * gcc.c-torture/compile/nested-1.c: New test. + 2004-10-14 Dorit Naishlos * testsuite/gcc.dg/vect/vect-44.c: xfail on i?86-*-*, x86_64-*-*, diff --git a/gcc/testsuite/gcc.c-torture/compile/nested-1.c b/gcc/testsuite/gcc.c-torture/compile/nested-1.c new file mode 100644 index 00000000000..b6aa79d77aa --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/nested-1.c @@ -0,0 +1,19 @@ +typedef __SIZE_TYPE__ size_t; +extern int printf (const char *, ...); +extern void *memset (void *, int, size_t); + +int bar (int (*)(), int, void *); + +int +main(int argc, char **argv) +{ + struct s { int a; char b[argc]; }; + int nested (struct s x) { return x.a + sizeof(x); } + struct s t; + memset (&t, 0, sizeof(t)); + t.a = 123; + printf("%d\n", bar (nested, argc, &t)); + return 0; +} + +