diff options
author | Andrew Stubbs <ams@codesourcery.com> | 2019-01-17 12:36:10 +0000 |
---|---|---|
committer | Andrew Stubbs <ams@gcc.gnu.org> | 2019-01-17 12:36:10 +0000 |
commit | 90eb9be6eb4a7286cf2864d7846103a66c7e3741 (patch) | |
tree | 60c4a4bdb778dea4a46ce6989d028623b0032606 /gcc | |
parent | 3f21b8e3f7be32dd2b3624a2ece12f84bed545bb (diff) | |
download | gcc-90eb9be6eb4a7286cf2864d7846103a66c7e3741.zip gcc-90eb9be6eb4a7286cf2864d7846103a66c7e3741.tar.gz gcc-90eb9be6eb4a7286cf2864d7846103a66c7e3741.tar.bz2 |
Testsuite: GCN is always PIE.
The GCN/HSA loader ignores the load address and uses a random location, so we
build all GCN binaries as PIE, by default.
This patch makes the necessary testsuite adjustments to make this work
correctly.
2019-01-17 Andrew Stubbs <ams@codesourcery.com>
gcc/testsuite/
* gcc.dg/graphite/scop-19.c: Check pie_enabled.
* gcc.dg/pic-1.c: Disable on amdgcn.
* gcc.dg/pic-2.c: Disable on amdgcn.
* gcc.dg/pic-3.c: Disable on amdgcn.
* gcc.dg/pic-4.c: Disable on amdgcn.
* gcc.dg/pie-3.c: Disable on amdgcn.
* gcc.dg/pie-4.c: Disable on amdgcn.
* gcc.dg/uninit-19.c: Check pie_enabled.
* lib/target-supports.exp (check_effective_target_pie): Add amdgcn.
From-SVN: r268026
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/graphite/scop-19.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pic-1.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pic-2.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pic-3.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pic-4.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pie-3.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pie-4.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 3 |
9 files changed, 22 insertions, 8 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c4e1dd5..e57b7ee 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,16 @@ 2019-01-17 Andrew Stubbs <ams@codesourcery.com> + + * gcc.dg/graphite/scop-19.c: Check pie_enabled. + * gcc.dg/pic-1.c: Disable on amdgcn. + * gcc.dg/pic-2.c: Disable on amdgcn. + * gcc.dg/pic-3.c: Disable on amdgcn. + * gcc.dg/pic-4.c: Disable on amdgcn. + * gcc.dg/pie-3.c: Disable on amdgcn. + * gcc.dg/pie-4.c: Disable on amdgcn. + * gcc.dg/uninit-19.c: Check pie_enabled. + * lib/target-supports.exp (check_effective_target_pie): Add amdgcn. + +2019-01-17 Andrew Stubbs <ams@codesourcery.com> Kwok Cheung Yeung <kcy@codesourcery.com> Julian Brown <julian@codesourcery.com> Tom de Vries <tom@codesourcery.com> diff --git a/gcc/testsuite/gcc.dg/graphite/scop-19.c b/gcc/testsuite/gcc.dg/graphite/scop-19.c index c89717b..6028132 100644 --- a/gcc/testsuite/gcc.dg/graphite/scop-19.c +++ b/gcc/testsuite/gcc.dg/graphite/scop-19.c @@ -31,6 +31,6 @@ d_growable_string_append_buffer (struct d_growable_string *dgs, if (need > dgs->alc) d_growable_string_resize (dgs, need); } -/* { dg-final { scan-tree-dump-times "number of SCoPs: 0" 2 "graphite" { target nonpic } } } */ -/* { dg-final { scan-tree-dump-times "number of SCoPs: 0" 1 "graphite" { target { ! nonpic } } } } */ +/* { dg-final { scan-tree-dump-times "number of SCoPs: 0" 2 "graphite" { target { nonpic || pie_enabled } } } } */ +/* { dg-final { scan-tree-dump-times "number of SCoPs: 0" 1 "graphite" { target { ! { nonpic || pie_enabled } } } } } */ diff --git a/gcc/testsuite/gcc.dg/pic-1.c b/gcc/testsuite/gcc.dg/pic-1.c index 82ba43d..4bb332e 100644 --- a/gcc/testsuite/gcc.dg/pic-1.c +++ b/gcc/testsuite/gcc.dg/pic-1.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { ! { *-*-darwin* hppa*-*-* } } } } */ +/* { dg-do compile { target { ! { *-*-darwin* hppa*-*-* amdgcn*-*-* } } } } */ /* { dg-require-effective-target fpic } */ /* { dg-options "-fpic" } */ diff --git a/gcc/testsuite/gcc.dg/pic-2.c b/gcc/testsuite/gcc.dg/pic-2.c index bccec13..3846ec4 100644 --- a/gcc/testsuite/gcc.dg/pic-2.c +++ b/gcc/testsuite/gcc.dg/pic-2.c @@ -2,6 +2,7 @@ /* { dg-require-effective-target fpic } */ /* { dg-options "-fPIC" } */ /* { dg-skip-if "__PIC__ is always 1 for MIPS" { mips*-*-* } } */ +/* { dg-skip-if "__PIE__ is always defined for GCN" { amdgcn*-*-* } } */ #if __PIC__ != 2 # error __PIC__ is not 2! diff --git a/gcc/testsuite/gcc.dg/pic-3.c b/gcc/testsuite/gcc.dg/pic-3.c index c56f06f..1397977 100644 --- a/gcc/testsuite/gcc.dg/pic-3.c +++ b/gcc/testsuite/gcc.dg/pic-3.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* } } } } */ +/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* amdgcn*-*-* } } } } */ /* { dg-options "-fno-pic" } */ #ifdef __PIC__ diff --git a/gcc/testsuite/gcc.dg/pic-4.c b/gcc/testsuite/gcc.dg/pic-4.c index 2afdd99..d6d9dc9 100644 --- a/gcc/testsuite/gcc.dg/pic-4.c +++ b/gcc/testsuite/gcc.dg/pic-4.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* } } } } */ +/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* amdgcn*-*-* } } } } */ /* { dg-options "-fno-PIC" } */ #ifdef __PIC__ diff --git a/gcc/testsuite/gcc.dg/pie-3.c b/gcc/testsuite/gcc.dg/pie-3.c index 5577437..fd4a48d 100644 --- a/gcc/testsuite/gcc.dg/pie-3.c +++ b/gcc/testsuite/gcc.dg/pie-3.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* } } } } */ +/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* amdgcn*-*-* } } } } */ /* { dg-options "-fno-pie" } */ #ifdef __PIC__ diff --git a/gcc/testsuite/gcc.dg/pie-4.c b/gcc/testsuite/gcc.dg/pie-4.c index 4134676..5523602 100644 --- a/gcc/testsuite/gcc.dg/pie-4.c +++ b/gcc/testsuite/gcc.dg/pie-4.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* } } } } */ +/* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* amdgcn*-*-* } } } } */ /* { dg-options "-fno-PIE" } */ #ifdef __PIC__ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index cc6e2bb..03b5cd5 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1176,7 +1176,8 @@ proc check_effective_target_pie { } { || [istarget *-*-dragonfly*] || [istarget *-*-freebsd*] || [istarget *-*-linux*] - || [istarget *-*-gnu*] } { + || [istarget *-*-gnu*] + || [istarget *-*-amdhsa]} { return 1; } if { [istarget *-*-solaris2.1\[1-9\]*] } { |