diff options
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/lto/20091017-1_0.c | 15 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/lto/20091017-1_1.c | 6 |
3 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8a58878..223d170 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2009-10-17 Richard Guenther <rguenther@suse.de> + + * gcc.dg/lto/20091017-1_0.c: New testcase. + * gcc.dg/lto/20091017-1_1.c: Likewise. + 2009-10-17 Eric Botcazou <ebotcazou@adacore.com> * gnat.dg/unchecked_convert4.adb: Add missing rep clause. diff --git a/gcc/testsuite/gcc.dg/lto/20091017-1_0.c b/gcc/testsuite/gcc.dg/lto/20091017-1_0.c new file mode 100644 index 0000000..ec4c62e --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/20091017-1_0.c @@ -0,0 +1,15 @@ +/* { dg-lto-do run } */ + +struct X { + int i; +}; +extern void foo (void *); +extern void abort (void); +int main () +{ + struct X *p; + foo(&p); + if (p != (struct X *)0) + abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/lto/20091017-1_1.c b/gcc/testsuite/gcc.dg/lto/20091017-1_1.c new file mode 100644 index 0000000..23e5992 --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/20091017-1_1.c @@ -0,0 +1,6 @@ +struct X; +void foo (void *q) +{ + struct X **p = (struct X **)q; + *p = (struct X *)0; +} |