From ff83f9c8e9e79eb8ec8b9f11b5086f805e774bad Mon Sep 17 00:00:00 2001 From: Alexander Ivchenko Date: Tue, 18 Nov 2014 10:53:13 +0000 Subject: [PATCH] safe-3.c: Add bind_pic_locally. gcc/testsuite * c-c++-common/tm/safe-3.c: Add bind_pic_locally. * g++.dg/ipa/devirt-15.C: Ditto. * g++.dg/ipa/devirt-7.C: Ditto. * g++.dg/ipa/pr60600.C: Ditto. * g++.dg/opt/vt2.C: Ditto. * g++.dg/opt/vt4.C: Ditto. * g++.dg/pr48484.C: Ditto. * g++.dg/tm/pr47746.C: Ditto. * g++.dg/tree-ssa/pr57380.C: Ditto. * gcc.dg/ipa/inline-4.c: Ditto. * gcc.dg/ipa/inlinehint-1.c: Ditto. * gcc.dg/ipa/inlinehint-2.c: Ditto. * gcc.dg/ipa/inlinehint-3.c: Ditto. * gcc.dg/pr47276.c: Ditto. * gcc.dg/pure-2.c: Ditto. * gcc.dg/tm/nested-2.c: Ditto. * gcc.dg/tree-ssa/alias-29.c: Ditto. * gcc.target/i386/3dnow-1.c: Ditto. * gcc.target/i386/3dnow-2.c: Ditto. * gcc.target/i386/3dnowA-1.c: Ditto. * gcc.target/i386/3dnowA-2.c: Ditto. * gcc.target/i386/avx-1.c: Ditto. * gcc.target/i386/avx-2.c: Ditto. * gcc.target/i386/memcpy-1.c: Ditto. * gcc.target/i386/mmx-1.c: Ditto. * gcc.target/i386/mmx-2.c: Ditto. * gcc.target/i386/sse-14.c: Ditto. * gcc.target/i386/sse-22.c: Ditto. * gcc.target/i386/sse-22a.c: Ditto. * gcc.target/i386/sse-23.c: Ditto. * gcc.target/i386/sse-24.c: Ditto. * gcc.target/i386/vect-double-1.c: Ditto. * g++.dg/fstack-protector-strong.C: Add target nonpic. * gcc.dg/fstack-protector-strong.c: Ditto. From-SVN: r217704 --- gcc/testsuite/ChangeLog | 37 +++++++++++++++++++ gcc/testsuite/c-c++-common/tm/safe-3.c | 1 + .../g++.dg/fstack-protector-strong.C | 5 +++ gcc/testsuite/g++.dg/ipa/devirt-15.C | 2 + gcc/testsuite/g++.dg/ipa/devirt-7.C | 1 + gcc/testsuite/g++.dg/ipa/pr60600.C | 1 + gcc/testsuite/g++.dg/opt/vt2.C | 1 + gcc/testsuite/g++.dg/opt/vt4.C | 1 + gcc/testsuite/g++.dg/pr48484.C | 2 +- gcc/testsuite/g++.dg/tm/pr47746.C | 1 + gcc/testsuite/g++.dg/tree-ssa/pr57380.C | 1 + .../gcc.dg/fstack-protector-strong.c | 5 +++ gcc/testsuite/gcc.dg/ipa/inline-4.c | 1 + gcc/testsuite/gcc.dg/ipa/inlinehint-1.c | 2 + gcc/testsuite/gcc.dg/ipa/inlinehint-2.c | 2 + gcc/testsuite/gcc.dg/ipa/inlinehint-3.c | 2 + gcc/testsuite/gcc.dg/pr47276.c | 1 + gcc/testsuite/gcc.dg/pure-2.c | 1 + gcc/testsuite/gcc.dg/tm/nested-2.c | 1 + gcc/testsuite/gcc.dg/tree-ssa/alias-29.c | 1 + gcc/testsuite/gcc.target/i386/3dnow-1.c | 1 + gcc/testsuite/gcc.target/i386/3dnow-2.c | 1 + gcc/testsuite/gcc.target/i386/3dnowA-1.c | 1 + gcc/testsuite/gcc.target/i386/3dnowA-2.c | 1 + gcc/testsuite/gcc.target/i386/avx-1.c | 1 + gcc/testsuite/gcc.target/i386/avx-2.c | 1 + gcc/testsuite/gcc.target/i386/memcpy-1.c | 1 + gcc/testsuite/gcc.target/i386/mmx-1.c | 2 +- gcc/testsuite/gcc.target/i386/mmx-2.c | 1 + gcc/testsuite/gcc.target/i386/sse-14.c | 1 + gcc/testsuite/gcc.target/i386/sse-22.c | 1 + gcc/testsuite/gcc.target/i386/sse-22a.c | 1 + gcc/testsuite/gcc.target/i386/sse-23.c | 1 + gcc/testsuite/gcc.target/i386/sse-24.c | 1 + gcc/testsuite/gcc.target/i386/vect-double-1.c | 1 + 35 files changed, 83 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 36c9dd61af7..689f8870b6b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,40 @@ +2014-11-18 Alexander Ivchenko + + * c-c++-common/tm/safe-3.c: Add bind_pic_locally. + * g++.dg/ipa/devirt-15.C: Ditto. + * g++.dg/ipa/devirt-7.C: Ditto. + * g++.dg/ipa/pr60600.C: Ditto. + * g++.dg/opt/vt2.C: Ditto. + * g++.dg/opt/vt4.C: Ditto. + * g++.dg/pr48484.C: Ditto. + * g++.dg/tm/pr47746.C: Ditto. + * g++.dg/tree-ssa/pr57380.C: Ditto. + * gcc.dg/ipa/inline-4.c: Ditto. + * gcc.dg/ipa/inlinehint-1.c: Ditto. + * gcc.dg/ipa/inlinehint-2.c: Ditto. + * gcc.dg/ipa/inlinehint-3.c: Ditto. + * gcc.dg/pr47276.c: Ditto. + * gcc.dg/pure-2.c: Ditto. + * gcc.dg/tm/nested-2.c: Ditto. + * gcc.dg/tree-ssa/alias-29.c: Ditto. + * gcc.target/i386/3dnow-1.c: Ditto. + * gcc.target/i386/3dnow-2.c: Ditto. + * gcc.target/i386/3dnowA-1.c: Ditto. + * gcc.target/i386/3dnowA-2.c: Ditto. + * gcc.target/i386/avx-1.c: Ditto. + * gcc.target/i386/avx-2.c: Ditto. + * gcc.target/i386/memcpy-1.c: Ditto. + * gcc.target/i386/mmx-1.c: Ditto. + * gcc.target/i386/mmx-2.c: Ditto. + * gcc.target/i386/sse-14.c: Ditto. + * gcc.target/i386/sse-22.c: Ditto. + * gcc.target/i386/sse-22a.c: Ditto. + * gcc.target/i386/sse-23.c: Ditto. + * gcc.target/i386/sse-24.c: Ditto. + * gcc.target/i386/vect-double-1.c: Ditto. + * g++.dg/fstack-protector-strong.C: Add target nonpic. + * gcc.dg/fstack-protector-strong.c: Ditto. + 2014-11-18 Hale Wang * gcc.target/arm/small-multiply-m0-1.c: Only apply when diff --git a/gcc/testsuite/c-c++-common/tm/safe-3.c b/gcc/testsuite/c-c++-common/tm/safe-3.c index 8a883db5ef0..becbd2ff643 100644 --- a/gcc/testsuite/c-c++-common/tm/safe-3.c +++ b/gcc/testsuite/c-c++-common/tm/safe-3.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fgnu-tm" } */ +/* { dg-add-options bind_pic_locally } */ void f_extern (void); void f_first (void); diff --git a/gcc/testsuite/g++.dg/fstack-protector-strong.C b/gcc/testsuite/g++.dg/fstack-protector-strong.C index 5a820ed69d8..ae6d2fdb8df 100644 --- a/gcc/testsuite/g++.dg/fstack-protector-strong.C +++ b/gcc/testsuite/g++.dg/fstack-protector-strong.C @@ -3,6 +3,11 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2 -fstack-protector-strong" } */ +/* This test checks the presence of __stack_chk_fail function in assembler. + * Compiler generates _stack_chk_fail_local (wrapper) calls instead for PIC. + */ +/* { dg-require-effective-target nonpic } */ + class A { public: diff --git a/gcc/testsuite/g++.dg/ipa/devirt-15.C b/gcc/testsuite/g++.dg/ipa/devirt-15.C index 924564661b8..fd8389466e2 100644 --- a/gcc/testsuite/g++.dg/ipa/devirt-15.C +++ b/gcc/testsuite/g++.dg/ipa/devirt-15.C @@ -2,6 +2,8 @@ A is noreturn. */ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-ipa-devirt-details -fdump-tree-optimized" } */ +/* { dg-add-options bind_pic_locally } */ + class A { public: virtual int foo(void) diff --git a/gcc/testsuite/g++.dg/ipa/devirt-7.C b/gcc/testsuite/g++.dg/ipa/devirt-7.C index 1c59122303d..30df64a3704 100644 --- a/gcc/testsuite/g++.dg/ipa/devirt-7.C +++ b/gcc/testsuite/g++.dg/ipa/devirt-7.C @@ -2,6 +2,7 @@ comes from a method that has been early-inlined into a descendant. */ /* { dg-do run } */ /* { dg-options "-O3 -fdump-ipa-cp" } */ +/* { dg-add-options bind_pic_locally } */ extern "C" void abort (void); diff --git a/gcc/testsuite/g++.dg/ipa/pr60600.C b/gcc/testsuite/g++.dg/ipa/pr60600.C index 07539319307..8f6cd7aed1f 100644 --- a/gcc/testsuite/g++.dg/ipa/pr60600.C +++ b/gcc/testsuite/g++.dg/ipa/pr60600.C @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O3 -fdump-ipa-cp" } */ +/* { dg-add-options bind_pic_locally } */ struct data { data(int); diff --git a/gcc/testsuite/g++.dg/opt/vt2.C b/gcc/testsuite/g++.dg/opt/vt2.C index a77db38755a..780f58775c9 100644 --- a/gcc/testsuite/g++.dg/opt/vt2.C +++ b/gcc/testsuite/g++.dg/opt/vt2.C @@ -1,5 +1,6 @@ // PR c++/34949 // { dg-options "-O3" } +// { dg-add-options bind_pic_locally } // { dg-final { scan-assembler-not "mov\[^\n\]*_ZTV" { target i?86-*-* x86_64-*-* } } } class Foo diff --git a/gcc/testsuite/g++.dg/opt/vt4.C b/gcc/testsuite/g++.dg/opt/vt4.C index c8d04cffc16..98378da00f1 100644 --- a/gcc/testsuite/g++.dg/opt/vt4.C +++ b/gcc/testsuite/g++.dg/opt/vt4.C @@ -1,6 +1,7 @@ // PR c++/50243 // { dg-do compile } // { dg-options "-O" } +// { dg-add-options bind_pic_locally } // { dg-final { scan-assembler-not "_ZTV.A" } } void foo (); diff --git a/gcc/testsuite/g++.dg/pr48484.C b/gcc/testsuite/g++.dg/pr48484.C index 3f17f39a0a1..1380c452fa4 100644 --- a/gcc/testsuite/g++.dg/pr48484.C +++ b/gcc/testsuite/g++.dg/pr48484.C @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O -finline-functions -finline-small-functions -Wuninitialized" } */ - +/* { dg-add-options bind_pic_locally } */ struct SQObjectPtr { diff --git a/gcc/testsuite/g++.dg/tm/pr47746.C b/gcc/testsuite/g++.dg/tm/pr47746.C index 7cd9e1006d1..61082976e67 100644 --- a/gcc/testsuite/g++.dg/tm/pr47746.C +++ b/gcc/testsuite/g++.dg/tm/pr47746.C @@ -1,5 +1,6 @@ // { dg-do compile } // { dg-options "-fgnu-tm" } +/* { dg-add-options bind_pic_locally } */ class InputStream { diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr57380.C b/gcc/testsuite/g++.dg/tree-ssa/pr57380.C index 0a2b2ad5f55..b370292f11e 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/pr57380.C +++ b/gcc/testsuite/g++.dg/tree-ssa/pr57380.C @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-phiopt1" } */ +/* { dg-add-options bind_pic_locally } */ struct my_array { int data[4]; diff --git a/gcc/testsuite/gcc.dg/fstack-protector-strong.c b/gcc/testsuite/gcc.dg/fstack-protector-strong.c index da33abb3d7d..8e9d891acea 100644 --- a/gcc/testsuite/gcc.dg/fstack-protector-strong.c +++ b/gcc/testsuite/gcc.dg/fstack-protector-strong.c @@ -3,6 +3,11 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* rs6000-*-* s390x-*-* } } */ /* { dg-options "-O2 -fstack-protector-strong" } */ +/* This test checks the presence of __stack_chk_fail function in assembler. + * Compiler generates _stack_chk_fail_local (wrapper) calls instead for PIC. + */ +/* { dg-require-effective-target nonpic } */ + #include extern int g0; diff --git a/gcc/testsuite/gcc.dg/ipa/inline-4.c b/gcc/testsuite/gcc.dg/ipa/inline-4.c index af5c3020f09..6df541add54 100644 --- a/gcc/testsuite/gcc.dg/ipa/inline-4.c +++ b/gcc/testsuite/gcc.dg/ipa/inline-4.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-Os -c -fdump-ipa-inline -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */ +/* { dg-add-options bind_pic_locally } */ void work_hard (void); diff --git a/gcc/testsuite/gcc.dg/ipa/inlinehint-1.c b/gcc/testsuite/gcc.dg/ipa/inlinehint-1.c index 1cc5bdd0c07..c1688f18ed1 100644 --- a/gcc/testsuite/gcc.dg/ipa/inlinehint-1.c +++ b/gcc/testsuite/gcc.dg/ipa/inlinehint-1.c @@ -1,4 +1,6 @@ /* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */ +/* { dg-add-options bind_pic_locally } */ + void test2 (int); int test (int a) diff --git a/gcc/testsuite/gcc.dg/ipa/inlinehint-2.c b/gcc/testsuite/gcc.dg/ipa/inlinehint-2.c index 1579c2496bc..d1119a56f91 100644 --- a/gcc/testsuite/gcc.dg/ipa/inlinehint-2.c +++ b/gcc/testsuite/gcc.dg/ipa/inlinehint-2.c @@ -1,4 +1,6 @@ /* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */ +/* { dg-add-options bind_pic_locally } */ + int t(int s, void **p) { diff --git a/gcc/testsuite/gcc.dg/ipa/inlinehint-3.c b/gcc/testsuite/gcc.dg/ipa/inlinehint-3.c index f8d61a07efc..6a424ff1672 100644 --- a/gcc/testsuite/gcc.dg/ipa/inlinehint-3.c +++ b/gcc/testsuite/gcc.dg/ipa/inlinehint-3.c @@ -1,4 +1,6 @@ /* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */ +/* { dg-add-options bind_pic_locally } */ + void abort (void); int scc_entry (int); int sum; diff --git a/gcc/testsuite/gcc.dg/pr47276.c b/gcc/testsuite/gcc.dg/pr47276.c index 9276b1a6854..fb0c12549f0 100644 --- a/gcc/testsuite/gcc.dg/pr47276.c +++ b/gcc/testsuite/gcc.dg/pr47276.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-alias "" } */ /* { dg-require-visibility "" } */ +/* { dg-add-options bind_pic_locally } */ #define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname) #define ASMNAME2(prefix, cname) STRING (prefix) cname diff --git a/gcc/testsuite/gcc.dg/pure-2.c b/gcc/testsuite/gcc.dg/pure-2.c index 8c2ba56cd51..638bd7c550d 100644 --- a/gcc/testsuite/gcc.dg/pure-2.c +++ b/gcc/testsuite/gcc.dg/pure-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -Wsuggest-attribute=pure" } */ +/* { dg-add-options bind_pic_locally } */ extern int extern_const(int a) __attribute__ ((pure)); extern int v; diff --git a/gcc/testsuite/gcc.dg/tm/nested-2.c b/gcc/testsuite/gcc.dg/tm/nested-2.c index 205ca8d7eac..2ea3b93ec5c 100644 --- a/gcc/testsuite/gcc.dg/tm/nested-2.c +++ b/gcc/testsuite/gcc.dg/tm/nested-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fgnu-tm" } */ +/* { dg-add-options bind_pic_locally } */ void foobar(void) { diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-29.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-29.c index 4d57ca8f8f0..b23bdea612e 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/alias-29.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-29.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O -fdump-tree-optimized" } */ +/* { dg-add-options bind_pic_locally } */ union X { int i; diff --git a/gcc/testsuite/gcc.target/i386/3dnow-1.c b/gcc/testsuite/gcc.target/i386/3dnow-1.c index 953dc2aef5c..c0800cf1c26 100644 --- a/gcc/testsuite/gcc.target/i386/3dnow-1.c +++ b/gcc/testsuite/gcc.target/i386/3dnow-1.c @@ -1,6 +1,7 @@ /* { dg-do assemble } */ /* { dg-require-effective-target 3dnow } */ /* { dg-options "-O2 -Werror-implicit-function-declaration -m3dnow" } */ +/* { dg-add-options bind_pic_locally } */ /* Test that the intrinsics compile with optimization. All of them are defined as inline functions in mmintrin.h that reference the proper diff --git a/gcc/testsuite/gcc.target/i386/3dnow-2.c b/gcc/testsuite/gcc.target/i386/3dnow-2.c index 84b85408750..a89cb0bf541 100644 --- a/gcc/testsuite/gcc.target/i386/3dnow-2.c +++ b/gcc/testsuite/gcc.target/i386/3dnow-2.c @@ -1,6 +1,7 @@ /* { dg-do assemble } */ /* { dg-require-effective-target 3dnow } */ /* { dg-options "-O0 -Werror-implicit-function-declaration -m3dnow" } */ +/* { dg-add-options bind_pic_locally } */ /* Test that the intrinsics compile without optimization. All of them are defined as inline functions in mmintrin.h that reference the proper diff --git a/gcc/testsuite/gcc.target/i386/3dnowA-1.c b/gcc/testsuite/gcc.target/i386/3dnowA-1.c index e502dc98fbe..74e852f95ec 100644 --- a/gcc/testsuite/gcc.target/i386/3dnowA-1.c +++ b/gcc/testsuite/gcc.target/i386/3dnowA-1.c @@ -1,6 +1,7 @@ /* { dg-do assemble } */ /* { dg-require-effective-target 3dnow } */ /* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -m3dnow" } */ +/* { dg-add-options bind_pic_locally } */ /* Test that the intrinsics compile with optimization. All of them are defined as inline functions in mmintrin.h that reference the proper diff --git a/gcc/testsuite/gcc.target/i386/3dnowA-2.c b/gcc/testsuite/gcc.target/i386/3dnowA-2.c index 8475094abbe..c1f2daab6ba 100644 --- a/gcc/testsuite/gcc.target/i386/3dnowA-2.c +++ b/gcc/testsuite/gcc.target/i386/3dnowA-2.c @@ -1,6 +1,7 @@ /* { dg-do assemble } */ /* { dg-require-effective-target 3dnow } */ /* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -m3dnow" } */ +/* { dg-add-options bind_pic_locally } */ /* Test that the intrinsics compile without optimization. All of them are defined as inline functions in mmintrin.h that reference the proper diff --git a/gcc/testsuite/gcc.target/i386/avx-1.c b/gcc/testsuite/gcc.target/i386/avx-1.c index 6b048e0774a..0418d07ad48 100644 --- a/gcc/testsuite/gcc.target/i386/avx-1.c +++ b/gcc/testsuite/gcc.target/i386/avx-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -m3dnow -mavx -mavx2 -maes -mpclmul" } */ +/* { dg-add-options bind_pic_locally } */ #include diff --git a/gcc/testsuite/gcc.target/i386/avx-2.c b/gcc/testsuite/gcc.target/i386/avx-2.c index 17bc64e4deb..0061d9cdd22 100644 --- a/gcc/testsuite/gcc.target/i386/avx-2.c +++ b/gcc/testsuite/gcc.target/i386/avx-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -m3dnow -mavx -mavx2 -msse4a -maes -mpclmul" } */ +/* { dg-add-options bind_pic_locally } */ #include diff --git a/gcc/testsuite/gcc.target/i386/memcpy-1.c b/gcc/testsuite/gcc.target/i386/memcpy-1.c index 2a7595e81d3..725c864d866 100644 --- a/gcc/testsuite/gcc.target/i386/memcpy-1.c +++ b/gcc/testsuite/gcc.target/i386/memcpy-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target ia32 } */ /* { dg-options "-O2 -march=pentiumpro -minline-all-stringops -fno-common" } */ +/* { dg-add-options bind_pic_locally } */ /* { dg-final { scan-assembler "rep" } } */ /* { dg-final { scan-assembler "movs" } } */ /* { dg-final { scan-assembler-not "test" } } */ diff --git a/gcc/testsuite/gcc.target/i386/mmx-1.c b/gcc/testsuite/gcc.target/i386/mmx-1.c index e304acaa3ff..7078c22ec9a 100644 --- a/gcc/testsuite/gcc.target/i386/mmx-1.c +++ b/gcc/testsuite/gcc.target/i386/mmx-1.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ -/* { dg-do compile { target { nonpic } } } */ /* { dg-options "-O2 -Werror-implicit-function-declaration -mmmx" } */ +/* { dg-add-options bind_pic_locally } */ /* Test that the intrinsics compile with optimization. All of them are defined as inline functions in mmintrin.h that reference the proper diff --git a/gcc/testsuite/gcc.target/i386/mmx-2.c b/gcc/testsuite/gcc.target/i386/mmx-2.c index d15ceb18513..2bb54883b9b 100644 --- a/gcc/testsuite/gcc.target/i386/mmx-2.c +++ b/gcc/testsuite/gcc.target/i386/mmx-2.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O0 -Werror-implicit-function-declaration -mmmx" } */ +/* { dg-add-options bind_pic_locally } */ /* Test that the intrinsics compile without optimization. All of them are defined as inline functions in mmintrin.h that reference the proper builtin functions. Defining away "extern" and "__inline" results in diff --git a/gcc/testsuite/gcc.target/i386/sse-14.c b/gcc/testsuite/gcc.target/i386/sse-14.c index cc3b29c6c30..a2a4f73cabb 100644 --- a/gcc/testsuite/gcc.target/i386/sse-14.c +++ b/gcc/testsuite/gcc.target/i386/sse-14.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1 -mxsavec -mxsaves -mclflushopt -mavx512dq -mavx512bw -mavx512vl" } */ +/* { dg-add-options bind_pic_locally } */ #include diff --git a/gcc/testsuite/gcc.target/i386/sse-22.c b/gcc/testsuite/gcc.target/i386/sse-22.c index c1aea925cb4..1d1ed7b9d08 100644 --- a/gcc/testsuite/gcc.target/i386/sse-22.c +++ b/gcc/testsuite/gcc.target/i386/sse-22.c @@ -1,6 +1,7 @@ /* Same as sse-14, except converted to use #pragma GCC option. */ /* { dg-do compile } */ /* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8" } */ +/* { dg-add-options bind_pic_locally } */ #include diff --git a/gcc/testsuite/gcc.target/i386/sse-22a.c b/gcc/testsuite/gcc.target/i386/sse-22a.c index 688908f9ec9..11b4a973bf6 100644 --- a/gcc/testsuite/gcc.target/i386/sse-22a.c +++ b/gcc/testsuite/gcc.target/i386/sse-22a.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8" } */ +/* { dg-add-options bind_pic_locally } */ #define DIFFERENT_PRAGMAS diff --git a/gcc/testsuite/gcc.target/i386/sse-23.c b/gcc/testsuite/gcc.target/i386/sse-23.c index 06c9bed6147..f54f98d23dd 100644 --- a/gcc/testsuite/gcc.target/i386/sse-23.c +++ b/gcc/testsuite/gcc.target/i386/sse-23.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8" } */ +/* { dg-add-options bind_pic_locally } */ #include diff --git a/gcc/testsuite/gcc.target/i386/sse-24.c b/gcc/testsuite/gcc.target/i386/sse-24.c index daeb968a24f..768eb0d09c6 100644 --- a/gcc/testsuite/gcc.target/i386/sse-24.c +++ b/gcc/testsuite/gcc.target/i386/sse-24.c @@ -1,5 +1,6 @@ /* PR target/44338 */ /* { dg-do compile } */ /* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -ffp-contract=off" } */ +/* { dg-add-options bind_pic_locally } */ #include "sse-23.c" diff --git a/gcc/testsuite/gcc.target/i386/vect-double-1.c b/gcc/testsuite/gcc.target/i386/vect-double-1.c index 3bb07b02f52..c375956157d 100644 --- a/gcc/testsuite/gcc.target/i386/vect-double-1.c +++ b/gcc/testsuite/gcc.target/i386/vect-double-1.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-skip-if "" { *-*-* } { "-march=*" } { "-march=core2" } } */ /* { dg-options "-O2 -ftree-vectorize -mfpmath=sse -march=core2 -fdump-tree-vect-stats" } */ +/* { dg-add-options bind_pic_locally } */ extern void abort (void); -- 2.30.2