public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] Add dg-require-effective-target fpic to gcc.target/powerpc tests
@ 2020-11-03  9:12 Olivier Hainque
  2020-11-03 17:00 ` Segher Boessenkool
  0 siblings, 1 reply; 3+ messages in thread
From: Olivier Hainque @ 2020-11-03  9:12 UTC (permalink / raw)
  To: GCC Patches; +Cc: Olivier Hainque, Segher Boessenkool

[-- Attachment #1: Type: text/plain, Size: 710 bytes --]

Hello,

This change is a proposal to add 

 /* { dg-require-effective-target fpic } */

to a few tests in gcc.target/powerpc that do use
-fpic or -fPIC but don't currently query the target
support.

This corresponds to what many other fpic tests do
and helps the vxWorks ports at least, as -fpic is
typically not supported in at least one of the two
major modes of such port (kernel vs RTP).

Ok to commit?

Thanks in advance!

Best regards,

Olivier

2020-11-03  Olivier Hainque  <hainque@adacore.com>
    
gcc/testsuite/
        * gcc.target/powerpc/pr67789.c: Add
        dg-require-effective-target fpic.
        * gcc.target/powerpc/pr83629.c: Likewise.
        * gcc.target/powerpc/pr84112.c: Likewise.


[-- Attachment #2: 0001-Add-dg-require-effective-target-fpic-to-gcc.target-pow.txt --]
[-- Type: text/plain, Size: 1404 bytes --]

diff --git a/gcc/testsuite/gcc.target/powerpc/pr67789.c b/gcc/testsuite/gcc.target/powerpc/pr67789.c
index 371d7a3d8ede..05d01ef20d77 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr67789.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr67789.c
@@ -1,4 +1,5 @@
 /* { dg-do assemble } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O2 -msecure-plt -fPIC" } */
 /* { dg-skip-if "" { powerpc*-*-darwin* powerpc-ibm-aix* } } */
 
diff --git a/gcc/testsuite/gcc.target/powerpc/pr83629.c b/gcc/testsuite/gcc.target/powerpc/pr83629.c
index 250378ec485c..976b564e927d 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr83629.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr83629.c
@@ -1,4 +1,5 @@
 /* { dg-require-effective-target ilp32 } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-O2 -fPIC -frename-registers --param=sched-autopref-queue-depth=0 -mdejagnu-cpu=603" } */
 
 extern void bar (void *);
diff --git a/gcc/testsuite/gcc.target/powerpc/pr84112.c b/gcc/testsuite/gcc.target/powerpc/pr84112.c
index cd429df41a0a..c606f5b98552 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr84112.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr84112.c
@@ -1,4 +1,5 @@
 /* { dg-do compile { target powerpc*-*-* } }*/
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-mdejagnu-cpu=power8 -O3 -fstack-protector-strong -fpic" } */
 
 char *b;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] Add dg-require-effective-target fpic to gcc.target/powerpc tests
  2020-11-03  9:12 [patch] Add dg-require-effective-target fpic to gcc.target/powerpc tests Olivier Hainque
@ 2020-11-03 17:00 ` Segher Boessenkool
  2020-11-03 17:25   ` Olivier Hainque
  0 siblings, 1 reply; 3+ messages in thread
From: Segher Boessenkool @ 2020-11-03 17:00 UTC (permalink / raw)
  To: Olivier Hainque; +Cc: GCC Patches

Hi!

On Tue, Nov 03, 2020 at 10:12:54AM +0100, Olivier Hainque wrote:
> This change is a proposal to add 
> 
>  /* { dg-require-effective-target fpic } */
> 
> to a few tests in gcc.target/powerpc that do use
> -fpic or -fPIC but don't currently query the target
> support.
> 
> This corresponds to what many other fpic tests do
> and helps the vxWorks ports at least, as -fpic is
> typically not supported in at least one of the two
> major modes of such port (kernel vs RTP).

This is fine for trunk, thanks!

> --- a/gcc/testsuite/gcc.target/powerpc/pr84112.c
> +++ b/gcc/testsuite/gcc.target/powerpc/pr84112.c
> @@ -1,4 +1,5 @@
>  /* { dg-do compile { target powerpc*-*-* } }*/
> +/* { dg-require-effective-target fpic } */
>  /* { dg-options "-mdejagnu-cpu=power8 -O3 -fstack-protector-strong -fpic" } */

You could make that

/* { dg-do compile } */

at the same time, if you want?  If that is easy for you, don't bother
otherwise.


Segher

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [patch] Add dg-require-effective-target fpic to gcc.target/powerpc tests
  2020-11-03 17:00 ` Segher Boessenkool
@ 2020-11-03 17:25   ` Olivier Hainque
  0 siblings, 0 replies; 3+ messages in thread
From: Olivier Hainque @ 2020-11-03 17:25 UTC (permalink / raw)
  To: Segher Boessenkool; +Cc: Olivier Hainque, GCC Patches

Hi Segher,

> On 3 Nov 2020, at 18:00, Segher Boessenkool <segher@kernel.crashing.org> wrote:
> 
>> /* { dg-require-effective-target fpic } */
>> 
>> to a few tests in gcc.target/powerpc that do use
>> -fpic or -fPIC but don't currently query the target
>> support.

> This is fine for trunk, thanks!

Great :-)

>> --- a/gcc/testsuite/gcc.target/powerpc/pr84112.c
>> +++ b/gcc/testsuite/gcc.target/powerpc/pr84112.c
>> @@ -1,4 +1,5 @@
>> /* { dg-do compile { target powerpc*-*-* } }*/
>> +/* { dg-require-effective-target fpic } */
>> /* { dg-options "-mdejagnu-cpu=power8 -O3 -fstack-protector-strong -fpic" } */
> 
> You could make that
> 
> /* { dg-do compile } */
> 
> at the same time, if you want?  If that is easy for you, don't bother
> otherwise.

That's easy enough, will do.

Thanks for your prompt feedback!

Best Regards,

Olivier


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-03 17:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03  9:12 [patch] Add dg-require-effective-target fpic to gcc.target/powerpc tests Olivier Hainque
2020-11-03 17:00 ` Segher Boessenkool
2020-11-03 17:25   ` Olivier Hainque

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).