diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/20021029-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/20021029-2.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20021029-2.c b/gcc/testsuite/gcc.dg/20021029-2.c new file mode 100644 index 000000000..e99342478 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20021029-2.c @@ -0,0 +1,14 @@ +/* Test whether variables with relocations aren't put into + mergeable sections even with -fmerge-all-constants. */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fmerge-all-constants" } */ +/* { dg-final { scan-assembler-not ".rodata.cst" } } */ + +int foo (int a) +{ + static void * const ar[] = { &&l2 }; + void *p = ar[a]; + goto *p; +l2: + return 2; +} |