safe-3.c: Add bind_pic_locally.
authorAlexander Ivchenko <alexander.ivchenko@intel.com>
Tue, 18 Nov 2014 10:53:13 +0000 (10:53 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Tue, 18 Nov 2014 10:53:13 +0000 (10:53 +0000)
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

35 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/tm/safe-3.c
gcc/testsuite/g++.dg/fstack-protector-strong.C
gcc/testsuite/g++.dg/ipa/devirt-15.C
gcc/testsuite/g++.dg/ipa/devirt-7.C
gcc/testsuite/g++.dg/ipa/pr60600.C
gcc/testsuite/g++.dg/opt/vt2.C
gcc/testsuite/g++.dg/opt/vt4.C
gcc/testsuite/g++.dg/pr48484.C
gcc/testsuite/g++.dg/tm/pr47746.C
gcc/testsuite/g++.dg/tree-ssa/pr57380.C
gcc/testsuite/gcc.dg/fstack-protector-strong.c
gcc/testsuite/gcc.dg/ipa/inline-4.c
gcc/testsuite/gcc.dg/ipa/inlinehint-1.c
gcc/testsuite/gcc.dg/ipa/inlinehint-2.c
gcc/testsuite/gcc.dg/ipa/inlinehint-3.c
gcc/testsuite/gcc.dg/pr47276.c
gcc/testsuite/gcc.dg/pure-2.c
gcc/testsuite/gcc.dg/tm/nested-2.c
gcc/testsuite/gcc.dg/tree-ssa/alias-29.c
gcc/testsuite/gcc.target/i386/3dnow-1.c
gcc/testsuite/gcc.target/i386/3dnow-2.c
gcc/testsuite/gcc.target/i386/3dnowA-1.c
gcc/testsuite/gcc.target/i386/3dnowA-2.c
gcc/testsuite/gcc.target/i386/avx-1.c
gcc/testsuite/gcc.target/i386/avx-2.c
gcc/testsuite/gcc.target/i386/memcpy-1.c
gcc/testsuite/gcc.target/i386/mmx-1.c
gcc/testsuite/gcc.target/i386/mmx-2.c
gcc/testsuite/gcc.target/i386/sse-14.c
gcc/testsuite/gcc.target/i386/sse-22.c
gcc/testsuite/gcc.target/i386/sse-22a.c
gcc/testsuite/gcc.target/i386/sse-23.c
gcc/testsuite/gcc.target/i386/sse-24.c
gcc/testsuite/gcc.target/i386/vect-double-1.c

index 36c9dd61af75477d66bf115916d8a2dc4feacedb..689f8870b6b2171c59b1411727c0080de62fad27 100644 (file)
@@ -1,3 +1,40 @@
+2014-11-18  Alexander Ivchenko  <alexander.ivchenko@intel.com>
+
+       * 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  <hale.wang@arm.com>
 
        * gcc.target/arm/small-multiply-m0-1.c: Only apply when
index 8a883db5ef0519480c6fdc3875851ec4129cffcb..becbd2ff643a602b46fa724f39b0cf9ede91961b 100644 (file)
@@ -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);
index 5a820ed69d82b8da99ea797d8228e55da2fe1511..ae6d2fdb8df0dbde5e42afcd975ded4f049847c2 100644 (file)
@@ -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:
index 924564661b8e83251e7b0468655483642f995aef..fd8389466e27ebeb658c5fefc8f5bd6190aa0f58 100644 (file)
@@ -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)
index 1c59122303dc1b286ef7a571aa5c51c642302e5f..30df64a3704c0affc2799f67a6c2eb06c72161f1 100644 (file)
@@ -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);
 
index 07539319307c8145b7368a8443d538d5ee8fc4b8..8f6cd7aed1fa9f609b858b11e856125f0d3ebf4f 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O3 -fdump-ipa-cp" } */
+/* { dg-add-options bind_pic_locally } */
 
 struct data {
     data(int);
index a77db38755aee55e024740dfb47e412b36edf5e4..780f58775c9b7ea37e90e9aaa8cd58f4540d3437 100644 (file)
@@ -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
index c8d04cffc1655f9c11720ff7f0d04b0369134700..98378da00f1e44464fc3115c8629c17f90965baf 100644 (file)
@@ -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 ();
index 3f17f39a0a18a11a6cacca613e69c838a0a323fc..1380c452fa405939851654e70e2e3432006cfbb0 100644 (file)
@@ -1,6 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -finline-functions -finline-small-functions -Wuninitialized" }  */
-
+/* { dg-add-options bind_pic_locally } */
 
 struct SQObjectPtr
 {
index 7cd9e1006d12b8e36326847701fc71bba02f3a26..61082976e67b528e3ad7ade698ae8fdc6384074c 100644 (file)
@@ -1,5 +1,6 @@
 // { dg-do compile }
 // { dg-options "-fgnu-tm" }
+/* { dg-add-options bind_pic_locally } */
 
 class InputStream
 {
index 0a2b2ad5f5534d6a492a364adf69be2fd948c93f..b370292f11e2db7cf5d664d864f0d4837df3ce3c 100644 (file)
@@ -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];
index da33abb3d7d5427ab35611f5e3e036a2b22926cc..8e9d891aceaf84b1f06f8fb08b38e20a40d74289 100644 (file)
@@ -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;
index af5c3020f094996376e28a2e0091c32d9077c1e2..6df541add54f297da983bb4cd602b9ecaf702c05 100644 (file)
@@ -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);
 
index 1cc5bdd0c0732599ce781ea70594655bc2a2faa0..c1688f18ed1064f4b5a98835c4d12f08f1194b90 100644 (file)
@@ -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)
index 1579c2496bc0c79abffa635b57394f127879f858..d1119a56f91fdc1797b72b04b617dfbaaf2f8a6f 100644 (file)
@@ -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)
 {
index f8d61a07efc9856896853acfdb839aa42f3454e3..6a424ff1672b38e0be2e5ae8bdccd43c5f3bc95c 100644 (file)
@@ -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;
index 9276b1a68542d972ae5ac50eaf0cb9d5017c23f3..fb0c12549f0a07991ea072592449afd78c86f208 100644 (file)
@@ -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
index 8c2ba56cd51ab79ff366b097b874d5d93f29df23..638bd7c550db51872508b5b443d30bfc854f2b6a 100644 (file)
@@ -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;
index 205ca8d7eac6a13e1181152581030a563636a139..2ea3b93ec5ce8c5229f93fb3f4c50fd10b06aeba 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-fgnu-tm" } */
+/* { dg-add-options bind_pic_locally } */
 
 void foobar(void)
 {
index 4d57ca8f8f0fdbe138172cb2574e62d005d43e4c..b23bdea612e0d517f4b025862e2281fd3c545607 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O -fdump-tree-optimized" } */
+/* { dg-add-options bind_pic_locally } */
 
 union X {
     int i;
index 953dc2aef5c686a1b36a51b5aed056ad872d4e18..c0800cf1c2600875e20dbd9dc8b1db7f9c803feb 100644 (file)
@@ -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
index 84b85408750d9173cea691ef901a304f44f65dff..a89cb0bf541b0ee69ba025faf1e875674a945730 100644 (file)
@@ -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
index e502dc98fbe45af3d78af09d38a34ef25c18079c..74e852f95ec15f46865569f351c6e2ce096692bf 100644 (file)
@@ -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
index 8475094abbe0fb11992ef5a5d9a44b214521d8d0..c1f2daab6ba5386e03ff8a0096d2f4d200b8c113 100644 (file)
@@ -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
index 6b048e0774adbfbf77bad92bfce38162f1c018f1..0418d07ad48615e4b7178bd1441c30240efefdc5 100644 (file)
@@ -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>
 
index 17bc64e4deb375fecb6345a2cdc170fe1c811410..0061d9cdd229fdc4d61b036eccb1d97154da0eac 100644 (file)
@@ -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>
 
index 2a7595e81d31217466f8191739a2874c0878e86d..725c864d866dabb592f2ff19e6fe0b5a89365428 100644 (file)
@@ -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" } } */
index e304acaa3ff6330099232793993977a739f4630f..7078c22ec9a156f2bbf081e57a743ae2de797cb9 100644 (file)
@@ -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
index d15ceb18513764b614a803050f423dec281906ea..2bb54883b9b7cc210dd81ba50f7e2b459c2b25f2 100644 (file)
@@ -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
index cc3b29c6c30bfb725641b7bfd6a516e02e8bf128..a2a4f73cabb37f379e0d6e852d33238613d8909b 100644 (file)
@@ -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>
 
index c1aea925cb4e96e1aae2ad1c30f36875d32ea776..1d1ed7b9d08a03c20b18faddab49f36ac5d87070 100644 (file)
@@ -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>
 
index 688908f9ec970f96e19b8e5cefc8d1a5919acf1d..11b4a973bf66a5969cb4bad6eefcb8e5ba90f4fb 100644 (file)
@@ -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
 
index 06c9bed6147581341ee3990424293b266f3e134a..f54f98d23ddff2ca437c0c1b2f46fde1f4fe701f 100644 (file)
@@ -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>
 
index daeb968a24f36f1e926dc0e75da2933476d92f31..768eb0d09c6023cbec7dfd563eedd930fa2fb1e3 100644 (file)
@@ -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"
index 3bb07b02f5261ce14f4411aaa18eca5ab6494776..c375956157d9944017342eff121d0f3aa8e1aa76 100644 (file)
@@ -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);