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);
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:
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)
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);
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);
@@ -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
@@ -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 ();
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O -finline-functions -finline-small-functions
-Wuninitialized" } */
-
+/* { dg-add-options bind_pic_locally } */
struct SQObjectPtr
{
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
{
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];
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<string.h>
extern int g0;
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);
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)
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)
{
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;
@@ -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
@@ -1,5 +1,5 @@
-/* { 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;
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)
{
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;
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
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
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
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
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 <mm_malloc.h>
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 <mm_malloc.h>
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" } } */
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
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
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 <mm_malloc.h>
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 <mm_malloc.h>
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
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 <mm_malloc.h>
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"
b/gcc/testsuite/gcc.target/i386/vect-double-1.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-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);