summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lto/20090303_0.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/lto/20090303_0.C')
-rw-r--r--gcc/testsuite/g++.dg/lto/20090303_0.C23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lto/20090303_0.C b/gcc/testsuite/g++.dg/lto/20090303_0.C
new file mode 100644
index 000000000..36c8588bb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/20090303_0.C
@@ -0,0 +1,23 @@
+/* { dg-lto-do run } */
+/* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} } */
+/* { dg-lto-options {{-flto -flto-partition=1to1}} { target sparc*-*-* } } */
+/* { dg-suppress-ld-options {-fPIC} } */
+void foobar(int *, int* __x) ;
+int test_ints[30];
+int j;
+
+void foobar (int *x, int *y)
+{
+ *x = *y = 0;
+}
+
+void Test() {
+ int int_set_;
+ foobar (&int_set_, &test_ints[j]);
+}
+main()
+{
+ Test();
+ return 0;
+}
+