aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ppc64-toc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/ppc64-toc.c')
-rw-r--r--gcc/testsuite/gcc.dg/ppc64-toc.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ppc64-toc.c b/gcc/testsuite/gcc.dg/ppc64-toc.c
new file mode 100644
index 0000000..747f137
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ppc64-toc.c
@@ -0,0 +1,22 @@
+/* { dg-do link } */
+/* { dg-options "-m64 -mminimal-toc" { target powerpc64-*-* } } */
+
+char *strchr (const char *, int);
+
+int
+foo (int a)
+{
+ int b;
+
+ b = 0;
+ if ("/"[1] != '\0')
+ if (strchr ("/", a))
+ b = 1;
+ return b;
+}
+
+int
+main (void)
+{
+ return 0;
+}