summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C b/gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C
new file mode 100644
index 000000000..7488f1971
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.other/local-alloc1.C
@@ -0,0 +1,17 @@
+// { dg-do assemble { target fpic } }
+// { dg-options "-O0 -fpic" }
+// { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } }
+// Origin: Jakub Jelinek <jakub@redhat.com>
+
+struct bar {
+ bar() {}
+ double x[3];
+};
+
+static bar y[4];
+
+void foo(int z)
+{
+ bar w;
+ y[z] = w;
+}