Commit d4104911 by Christophe Lyon Committed by Christophe Lyon

[ARM/FDPIC v6 18/24] [ARM][testsuite] FDPIC: Enable tests on pie_enabled targets

Some tests have the "nonpic" guard, but pass on
arm*-*-uclinuxfdpiceabi because it is in PIE mode by default. Rather
than adding this target to all these tests, add the "pie_enabled"
effective target.

2019-09-10  Christophe Lyon  <christophe.lyon@st.com>

	gcc/testsuite/
	* g++.dg/cpp0x/noexcept03.C: Add pie_enabled.
	* g++.dg/ipa/devirt-c-7.C: Likewise.
	* g++.dg/ipa/ivinline-1.C: Likewise.
	* g++.dg/ipa/ivinline-2.C: Likewise.
	* g++.dg/ipa/ivinline-3.C: Likewise.
	* g++.dg/ipa/ivinline-4.C: Likewise.
	* g++.dg/ipa/ivinline-5.C: Likewise.
	* g++.dg/ipa/ivinline-7.C: Likewise.
	* g++.dg/ipa/ivinline-8.C: Likewise.
	* g++.dg/ipa/ivinline-9.C: Likewise.
	* g++.dg/tls/pr79288.C: Likewise.
	* gcc.dg/addr_equal-1.c: Likewise.
	* gcc.dg/const-1.c: Likewise.
	* gcc.dg/ipa/pure-const-1.c: Likewise.
	* gcc.dg/noreturn-8.c: Likewise.
	* gcc.dg/pr33826.c: Likewise.
	* gcc.dg/torture/ipa-pta-1.c: Likewise.
	* gcc.dg/tree-ssa/alias-2.c: Likewise.
	* gcc.dg/tree-ssa/ipa-split-5.c: Likewise.
	* gcc.dg/tree-ssa/loadpre6.c: Likewise.
	* gcc.dg/uninit-19.c: Likewise.

From-SVN: r275580
parent e8977296
2019-09-10 Christophe Lyon <christophe.lyon@st.com> 2019-09-10 Christophe Lyon <christophe.lyon@st.com>
* g++.dg/cpp0x/noexcept03.C: Add pie_enabled.
* g++.dg/ipa/devirt-c-7.C: Likewise.
* g++.dg/ipa/ivinline-1.C: Likewise.
* g++.dg/ipa/ivinline-2.C: Likewise.
* g++.dg/ipa/ivinline-3.C: Likewise.
* g++.dg/ipa/ivinline-4.C: Likewise.
* g++.dg/ipa/ivinline-5.C: Likewise.
* g++.dg/ipa/ivinline-7.C: Likewise.
* g++.dg/ipa/ivinline-8.C: Likewise.
* g++.dg/ipa/ivinline-9.C: Likewise.
* g++.dg/tls/pr79288.C: Likewise.
* gcc.dg/addr_equal-1.c: Likewise.
* gcc.dg/const-1.c: Likewise.
* gcc.dg/ipa/pure-const-1.c: Likewise.
* gcc.dg/noreturn-8.c: Likewise.
* gcc.dg/pr33826.c: Likewise.
* gcc.dg/torture/ipa-pta-1.c: Likewise.
* gcc.dg/tree-ssa/alias-2.c: Likewise.
* gcc.dg/tree-ssa/ipa-split-5.c: Likewise.
* gcc.dg/tree-ssa/loadpre6.c: Likewise.
* gcc.dg/uninit-19.c: Likewise.
2019-09-10 Christophe Lyon <christophe.lyon@st.com>
* g++.dg/abi/forced.C: Add *-*-uclinux*. * g++.dg/abi/forced.C: Add *-*-uclinux*.
* g++.dg/abi/guard2.C: Likewise. * g++.dg/abi/guard2.C: Likewise.
* g++.dg/ext/cleanup-10.C: Likewise. * g++.dg/ext/cleanup-10.C: Likewise.
......
// Runtime test for noexcept-specification. // Runtime test for noexcept-specification.
// { dg-options "-Wnoexcept" } // { dg-options "-Wnoexcept" }
// { dg-do run { target nonpic } } // { dg-do run { target { nonpic || pie_enabled } } }
// { dg-require-effective-target c++11 } // { dg-require-effective-target c++11 }
#include <exception> #include <exception>
......
/* Verify that ipa-cp will not get confused by placement new constructing an /* Verify that ipa-cp will not get confused by placement new constructing an
object within another one when looking for dynamic type change . */ object within another one when looking for dynamic type change . */
/* { dg-do run } */ /* { dg-do run { target { nonpic || pie_enabled } } } */
/* { dg-require-effective-target nonpic } */
/* { dg-options "-O3 -Wno-attributes" } */ /* { dg-options "-O3 -Wno-attributes" } */
extern "C" void abort (void); extern "C" void abort (void);
......
/* Verify that simple virtual calls are inlined even without early /* Verify that simple virtual calls are inlined even without early
inlining. */ inlining. */
/* { dg-do run { target nonpic } } */ /* { dg-do run { target { nonpic || pie_enabled } } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ /* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void); extern "C" void abort (void);
......
/* Verify that simple virtual calls using this pointer are inlined /* Verify that simple virtual calls using this pointer are inlined
even without early inlining.. */ even without early inlining.. */
/* { dg-do run { target nonpic } } */ /* { dg-do run { target { nonpic || pie_enabled } } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ /* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void); extern "C" void abort (void);
......
/* Verify that simple virtual calls on an object refrence are inlined /* Verify that simple virtual calls on an object refrence are inlined
even without early inlining. */ even without early inlining. */
/* { dg-do run { target nonpic } } */ /* { dg-do run { target { nonpic || pie_enabled } } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ /* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void); extern "C" void abort (void);
......
/* Verify that simple virtual calls are inlined even without early /* Verify that simple virtual calls are inlined even without early
inlining, even when a typecast to an ancestor is involved along the inlining, even when a typecast to an ancestor is involved along the
way. */ way. */
/* { dg-do run { target nonpic } } */ /* { dg-do run { target { nonpic || pie_enabled } } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ /* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void); extern "C" void abort (void);
......
/* Verify that virtual call inlining does not pick a wrong method when /* Verify that virtual call inlining does not pick a wrong method when
there is a user defined ancestor in an object. */ there is a user defined ancestor in an object. */
/* { dg-do run { target nonpic } } */ /* { dg-do run { target { nonpic || pie_enabled } } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ /* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void); extern "C" void abort (void);
......
/* Verify that simple virtual calls are inlined even without early /* Verify that simple virtual calls are inlined even without early
inlining, even when a typecast to an ancestor is involved along the inlining, even when a typecast to an ancestor is involved along the
way and that ancestor is not the first one with virtual functions. */ way and that ancestor is not the first one with virtual functions. */
/* { dg-do run { target nonpic } } */ /* { dg-do run { target { nonpic || pie_enabled } } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ /* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void); extern "C" void abort (void);
......
/* Verify that virtual calls are inlined (ithout early inlining) even /* Verify that virtual calls are inlined (ithout early inlining) even
when their caller is itself indirectly inlined. */ when their caller is itself indirectly inlined. */
/* { dg-do run { target nonpic } } */ /* { dg-do run { target { nonpic || pie_enabled } } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ /* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void); extern "C" void abort (void);
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
inlining, even when a typecast to an ancestor is involved along the inlining, even when a typecast to an ancestor is involved along the
way and that ancestor itself has an ancestor wich is not the way and that ancestor itself has an ancestor wich is not the
primary base class. */ primary base class. */
/* { dg-do run { target nonpic } } */ /* { dg-do run { target { nonpic || pie_enabled } } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ /* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void); extern "C" void abort (void);
......
// PR c++/79288 // PR c++/79288
// { dg-do compile { target nonpic } } // { dg-do compile { target { nonpic || pie_enabled } } }
// { dg-require-effective-target tls } // { dg-require-effective-target tls }
// { dg-options "-O2" } // { dg-options "-O2" }
// { dg-final { scan-assembler-not "@tpoff" { target i?86-*-* x86_64-*-* } } } // { dg-final { scan-assembler-not "@tpoff" { target i?86-*-* x86_64-*-* } } }
......
/* { dg-do run } */ /* { dg-do run { target { nonpic || pie_enabled } } } */
/* { dg-require-effective-target nonpic } */
/* { dg-require-weak "" } */ /* { dg-require-weak "" } */
/* { dg-require-alias "" } */ /* { dg-require-alias "" } */
/* { dg-options "-O2 -fdelete-null-pointer-checks" } */ /* { dg-options "-O2 -fdelete-null-pointer-checks" } */
......
/* { dg-do compile { target nonpic } } */ /* { dg-do compile { target { nonpic || pie_enabled } } } */
/* { dg-options "-O2 -Wsuggest-attribute=const -fno-finite-loops" } */ /* { dg-options "-O2 -Wsuggest-attribute=const -fno-finite-loops" } */
extern int extern_const(int a) __attribute__ ((const)); extern int extern_const(int a) __attribute__ ((const));
......
/* { dg-do compile { target nonpic } } */ /* { dg-do compile { target { nonpic || pie_enabled } } } */
/* { dg-options "-O3 -fdump-tree-local-pure-const1 -fdump-ipa-pure-const -fdump-tree-optimized -fno-early-inlining -fgnu89-inline" } */ /* { dg-options "-O3 -fdump-tree-local-pure-const1 -fdump-ipa-pure-const -fdump-tree-optimized -fno-early-inlining -fgnu89-inline" } */
void abort (void); void abort (void);
int error_code; int error_code;
......
/* { dg-do run { target nonpic } } */ /* { dg-do run { target { nonpic || pie_enabled } } } */
/* { dg-options "-O2" } */ /* { dg-options "-O2" } */
void exit (int); void exit (int);
void noreturn_autodetection_failed (); void noreturn_autodetection_failed ();
......
/* Regression test for PR middle-end/33826 */ /* Regression test for PR middle-end/33826 */
/* Verify that recursive functions cannot be pure or const. */ /* Verify that recursive functions cannot be pure or const. */
/* { dg-do compile } */ /* { dg-do compile { target { nonpic || pie_enabled } } } */
/* { dg-require-effective-target nonpic } */
/* { dg-options "-O1 -fdump-tree-local-pure-const1 -fdump-ipa-pure-const" } */ /* { dg-options "-O1 -fdump-tree-local-pure-const1 -fdump-ipa-pure-const" } */
int recurse1 (int); int recurse1 (int);
......
/* { dg-do compile { target { nonpic } } } */ /* { dg-do compile { target { nonpic || pie_enabled } } } */
/* { dg-options "-fipa-pta -fdump-ipa-pta2 -fno-ipa-icf" } */ /* { dg-options "-fipa-pta -fdump-ipa-pta2 -fno-ipa-icf" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-fno-fat-lto-objects" } { "" } } */ /* { dg-skip-if "" { *-*-* } { "-O0" "-fno-fat-lto-objects" } { "" } } */
......
/* { dg-do compile { target { nonpic } } } */ /* { dg-do compile { target { nonpic || pie_enabled } } } */
/* { dg-options "-O2 -fdump-tree-optimized" } */ /* { dg-options "-O2 -fdump-tree-optimized" } */
static int a; static int a;
int f; int f;
......
/* { dg-do compile { target nonpic } } */ /* { dg-do compile { target { nonpic || pie_enabled } } } */
/* { dg-options "-O3 -fdump-tree-fnsplit -fdump-tree-optimized --param=builtin-expect-probability=100" } */ /* { dg-options "-O3 -fdump-tree-fnsplit -fdump-tree-optimized --param=builtin-expect-probability=100" } */
struct a {int a,b;}; struct a {int a,b;};
......
/* { dg-do compile { target nonpic } } */ /* { dg-do compile { target { nonpic || pie_enabled } } } */
/* { dg-options "-O2 -fdump-tree-pre-stats -fdump-tree-fre1" } */ /* { dg-options "-O2 -fdump-tree-pre-stats -fdump-tree-fre1" } */
#include <stddef.h> #include <stddef.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment