diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr29584.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr29584.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr29584.c b/gcc/testsuite/gcc.dg/torture/pr29584.c new file mode 100644 index 000000000..4cb51d275 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr29584.c @@ -0,0 +1,28 @@ +/* PR middle-end/29584 */ +/* { dg-do compile { target { ilp32 || lp64 } } } */ + +extern void *foo1 (void); +extern void foo2 (void); +extern void foo3 (void *, void *); +extern int foo4 (void); + +void +bar (void) +{ + int i; + void *s; + for (i = 1; i < 4; i++) + { + if (foo4 ()) + foo2 (); + switch (0x8000000UL + i * 0x400) + { + case 0x80000000UL ... 0x80000000UL + 0x3a000000UL - 1: + s = 0; + break; + default: + s = foo1 (); + } + foo3 ((void *) (0x8000000UL + i * 0x400), s); + } +} |