public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [patch] g++ tests: Add dg-require-effective-target fpic to a few g++ tests
@ 2020-11-03 17:23 Olivier Hainque
  2020-11-06  3:21 ` Jeff Law
  0 siblings, 1 reply; 2+ messages in thread
From: Olivier Hainque @ 2020-11-03 17:23 UTC (permalink / raw)
  To: GCC Patches

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

Hello,

This change is a proposal to add 

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

to a few tests in g++.dg that use -fpic or -fPIC
but don't currently query the target support.

This corresponds to what most other fpic tests do
(typically, unless this is implied by some other test
such as "target os is Linux") and helps the vxWorks
ports at least, as -fpic is not supported in one of
the two major modes of such port (kernel vs RTP).

Ok to commit ?

Thanks in advance!

Best Regards,

Olivier

2020-11-02  Olivier Hainque  <hainque@adacore.com>
    
testsuite/
        * g++.dg/pr57878.C: Add dg-require-effective-target fpic.
        * g++.dg/pr65032.C: Likewise.
        * g++.dg/pr84279.C: Likewise.
        * g++.dg/inherit/thunk8.C: Likewise.
        * g++.dg/inherit/opt/pr64411.C: Likewise.


[-- Attachment #2: dg-require-fpic-gxx.txt --]
[-- Type: text/plain, Size: 2430 bytes --]

diff --git a/gcc/testsuite/g++.dg/inherit/thunk8.C b/gcc/testsuite/g++.dg/inherit/thunk8.C
index ef645356898d..ecb9cbf37fee 100644
--- a/gcc/testsuite/g++.dg/inherit/thunk8.C
+++ b/gcc/testsuite/g++.dg/inherit/thunk8.C
@@ -4,6 +4,7 @@
 
 /* { dg-do compile } */
 /* { dg-require-effective-target arm_thumb1_ok } */
+/* { dg-require-effective-target fpic } */
 /* { dg-options "-mthumb -fPIC" } */
 
 struct A {
diff --git a/gcc/testsuite/g++.dg/opt/pr64411.C b/gcc/testsuite/g++.dg/opt/pr64411.C
index 122b9eec414e..6ecc0a89de27 100644
--- a/gcc/testsuite/g++.dg/opt/pr64411.C
+++ b/gcc/testsuite/g++.dg/opt/pr64411.C
@@ -1,5 +1,6 @@
 // PR target/64411
 // { dg-do compile { target { { i?86-*-* x86_64-*-* } && lp64 } } }
+// { dg-require-effective-target fpic }
 // { dg-options "-Os -mcmodel=medium -fPIC -fschedule-insns -fselective-scheduling" }
 
 typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/g++.dg/pr57878.C b/gcc/testsuite/g++.dg/pr57878.C
index 5df2b7c9ef4e..ee9142b484bb 100644
--- a/gcc/testsuite/g++.dg/pr57878.C
+++ b/gcc/testsuite/g++.dg/pr57878.C
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
 // { dg-require-effective-target c++11 }
+// { dg-require-effective-target fpic }
 /* { dg-options "-O2 -fno-omit-frame-pointer -fPIC" } */
 
 typedef int int32;
diff --git a/gcc/testsuite/g++.dg/pr65032.C b/gcc/testsuite/g++.dg/pr65032.C
index d6b6768d25a6..6e348f83a8e0 100644
--- a/gcc/testsuite/g++.dg/pr65032.C
+++ b/gcc/testsuite/g++.dg/pr65032.C
@@ -1,4 +1,5 @@
 // { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target fpic }
 // { dg-options "-Os -std=c++11 -fPIC -fstack-protector-strong -fomit-frame-pointer" }
 
 #pragma GCC visibility push(hidden)
diff --git a/gcc/testsuite/g++.dg/pr84279.C b/gcc/testsuite/g++.dg/pr84279.C
index a88d3fb84703..b2b5b8eabab1 100644
--- a/gcc/testsuite/g++.dg/pr84279.C
+++ b/gcc/testsuite/g++.dg/pr84279.C
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-skip-if "" { powerpc*-*-darwin* } } */
 /* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-require-effective-target fpic } */
 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power8" } } */
 /* { dg-options "-O3 -mcpu=power8 -g -fPIC -fvisibility=hidden -fstack-protector-strong" } */
 
-- 
2.17.1


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

* Re: [patch] g++ tests: Add dg-require-effective-target fpic to a few g++ tests
  2020-11-03 17:23 [patch] g++ tests: Add dg-require-effective-target fpic to a few g++ tests Olivier Hainque
@ 2020-11-06  3:21 ` Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2020-11-06  3:21 UTC (permalink / raw)
  To: Olivier Hainque, GCC Patches


On 11/3/20 10:23 AM, Olivier Hainque wrote:
> Hello,
>
> This change is a proposal to add 
>
>   /* { dg-require-effective-target fpic } */
>
> to a few tests in g++.dg that use -fpic or -fPIC
> but don't currently query the target support.
>
> This corresponds to what most other fpic tests do
> (typically, unless this is implied by some other test
> such as "target os is Linux") and helps the vxWorks
> ports at least, as -fpic is not supported in one of
> the two major modes of such port (kernel vs RTP).
>
> Ok to commit ?
>
> Thanks in advance!
>
> Best Regards,
>
> Olivier
>
> 2020-11-02  Olivier Hainque  <hainque@adacore.com>
>     
> testsuite/
>         * g++.dg/pr57878.C: Add dg-require-effective-target fpic.
>         * g++.dg/pr65032.C: Likewise.
>         * g++.dg/pr84279.C: Likewise.
>         * g++.dg/inherit/thunk8.C: Likewise.
>         * g++.dg/inherit/opt/pr64411.C: Likewise.

OK

jeff



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

end of thread, other threads:[~2020-11-06  3:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03 17:23 [patch] g++ tests: Add dg-require-effective-target fpic to a few g++ tests Olivier Hainque
2020-11-06  3:21 ` Jeff Law

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).