diff options
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr30744-1.c | 15 |
2 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 13e84470614..d469c95e120 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-03-04 Roger Sayle <roger@eyesopen.com> + + PR middle-end/30744 + * gcc.dg/pr30744-1.c: New test case. + 2007-03-04 Tobias Burnus <burnus@net-b.de> * gfortran.dg/c_by_val.c: Use _Complex instead of a struct. diff --git a/gcc/testsuite/gcc.dg/pr30744-1.c b/gcc/testsuite/gcc.dg/pr30744-1.c new file mode 100644 index 00000000000..f0734db60f2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr30744-1.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +typedef struct { + unsigned long unique; +} G; + +void r(G* n) +{ + unsigned long p; + if (((G *) ((void *)((~(unsigned long)(p))))) != ((void *)0)) { + ((G *) ((void *)((~(unsigned long)(p)))))->unique = n->unique; + } +} + |