aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/20021029-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/20021029-2.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/20021029-2.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/20021029-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/20021029-2.c
new file mode 100644
index 000000000..e99342478
--- /dev/null
+++ b/gcc-4.9/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;
+}