summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr65248-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr65248-3.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/pr65248-3.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr65248-3.c b/gcc/testsuite/gcc.target/i386/pr65248-3.c
new file mode 100644
index 00000000000..e7a05eac6e6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr65248-3.c
@@ -0,0 +1,17 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -fpic" } */
+
+/* Initialized symbol with -fpic. */
+__attribute__((visibility("protected")))
+int xxx = -1;
+
+int
+foo ()
+{
+ return xxx;
+}
+
+/* { dg-final { scan-assembler-not "xxx\\(%rip\\)" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler "xxx@GOTPCREL" { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-not "xxx@GOTOFF" { target ia32 } } } */
+/* { dg-final { scan-assembler "xxx@GOT\\(" { target ia32 } } } */