summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/fstack-protector-strong.c3
-rw-r--r--gcc/testsuite/gcc.dg/pr35514-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr35514-2.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-1.c3
4 files changed, 34 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/fstack-protector-strong.c b/gcc/testsuite/gcc.dg/fstack-protector-strong.c
index 8e9d891acea..50ea5d0b112 100644
--- a/gcc/testsuite/gcc.dg/fstack-protector-strong.c
+++ b/gcc/testsuite/gcc.dg/fstack-protector-strong.c
@@ -154,4 +154,5 @@ void foo12 ()
global3 ();
}
-/* { dg-final { scan-assembler-times "stack_chk_fail" 12 } } */
+/* { dg-final { scan-assembler-times "stack_chk_fail" 13 { target elf } } } */
+/* { dg-final { scan-assembler-times "stack_chk_fail" 12 { target { ! elf } } } } */
diff --git a/gcc/testsuite/gcc.dg/pr35514-1.c b/gcc/testsuite/gcc.dg/pr35514-1.c
new file mode 100644
index 00000000000..43eeec46d32
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr35514-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { elf } } } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler ".type\[^\\n\]*object, \(%|@\)object" } } */
+/* { dg-final { scan-assembler ".type\[^\\n\]*function, \(%|@\)function" } } */
+
+/* Verify that we generate proper symbol types for external reference. */
+
+extern int object;
+void function (void);
+
+int
+foo (void)
+{
+ function ();
+ return object;
+}
diff --git a/gcc/testsuite/gcc.dg/pr35514-2.c b/gcc/testsuite/gcc.dg/pr35514-2.c
new file mode 100644
index 00000000000..d915bf520a2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr35514-2.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { elf } } } */
+/* { dg-require-effective-target tls } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-not ".type\[^\\n\]*object, \(%|@\)object" } } */
+
+/* Verify that we generate proper symbol types for external reference. */
+
+extern __thread int object;
+
+int
+foo (void)
+{
+ return object;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
index 9d18dd7efdc..0903ea2e342 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
@@ -46,7 +46,8 @@ int xxx(void)
/* CRIS keeps the address in a register. */
/* m68k sometimes puts the address in a register, depending on CPU and PIC. */
-/* { dg-final { scan-assembler-times "foo" 5 { xfail hppa*-*-* ia64*-*-* sh*-*-* cris-*-* crisv32-*-* fido-*-* m68k-*-* i?86-*-mingw* i?86-*-cygwin* x86_64-*-mingw* visium-*-* } } } */
+/* { dg-final { scan-assembler-times "foo" 5 { target { ! elf } xfail hppa*-*-* ia64*-*-* sh*-*-* cris-*-* crisv32-*-* fido-*-* m68k-*-* i?86-*-mingw* i?86-*-cygwin* x86_64-*-mingw* visium-*-* } } } */
+/* { dg-final { scan-assembler-times "foo" 6 { target elf xfail hppa*-*-* ia64*-*-* sh*-*-* cris-*-* crisv32-*-* fido-*-* m68k-*-* visium-*-* } } } */
/* { dg-final { scan-assembler-times "foo,%r" 5 { target hppa*-*-* } } } */
/* { dg-final { scan-assembler-times "= foo" 5 { target ia64*-*-* } } } */
/* { dg-final { scan-assembler-times "call\[ \t\]*_foo" 5 { target i?86-*-mingw* i?86-*-cygwin* } } } */