public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6678] gcc/testsuite/gcc.dg: Fix pic test case for PE targets
@ 2023-03-15  0:11 Jonathan Yong
  0 siblings, 0 replies; only message in thread
From: Jonathan Yong @ 2023-03-15  0:11 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:38945ee3b2884e5514272c4b41a507ebdfddbb3d

commit r13-6678-g38945ee3b2884e5514272c4b41a507ebdfddbb3d
Author: Jonathan Yong <10walls@gmail.com>
Date:   Tue Feb 14 10:37:03 2023 +0000

    gcc/testsuite/gcc.dg: Fix pic test case for PE targets
    
    gcc/testsuite/ChangeLog:
    
            * gcc.dg/pic-2.c: Fix expected __PIC__ value.
            * gcc.dg/pic-3.c: Ditto.
            * gcc.dg/pic-4.c: Ditto.
    
    Signed-off-by: Jonathan Yong <10walls@gmail.com>

Diff:
---
 gcc/testsuite/gcc.dg/pic-2.c | 6 +++++-
 gcc/testsuite/gcc.dg/pic-3.c | 6 +++++-
 gcc/testsuite/gcc.dg/pic-4.c | 6 +++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/pic-2.c b/gcc/testsuite/gcc.dg/pic-2.c
index 3846ec4ff47..24260538cc0 100644
--- a/gcc/testsuite/gcc.dg/pic-2.c
+++ b/gcc/testsuite/gcc.dg/pic-2.c
@@ -4,7 +4,11 @@
 /* { dg-skip-if "__PIC__ is always 1 for MIPS" { mips*-*-* } } */
 /* { dg-skip-if "__PIE__ is always defined for GCN" { amdgcn*-*-* } } */
 
-#if __PIC__ != 2
+#if defined(__CYGWIN__) || defined(__WIN32__)
+# if __PIC__ != 1
+#  error __PIC__ is not 1!
+# endif
+#elif __PIC__ != 2
 # error __PIC__ is not 2!
 #endif
 
diff --git a/gcc/testsuite/gcc.dg/pic-3.c b/gcc/testsuite/gcc.dg/pic-3.c
index 1397977e7f8..d3eb120652a 100644
--- a/gcc/testsuite/gcc.dg/pic-3.c
+++ b/gcc/testsuite/gcc.dg/pic-3.c
@@ -1,7 +1,11 @@
 /* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* amdgcn*-*-* } } } } */
 /* { dg-options "-fno-pic" } */
 
-#ifdef __PIC__
+#if defined(__CYGWIN__) || defined(__WIN32__)
+# if __PIC__ != 1
+#  error __PIC__ is not 1!
+# endif
+#elif __PIC__
 # error __PIC__ is defined!
 #endif
 
diff --git a/gcc/testsuite/gcc.dg/pic-4.c b/gcc/testsuite/gcc.dg/pic-4.c
index d6d9dc90046..d7acefaf9aa 100644
--- a/gcc/testsuite/gcc.dg/pic-4.c
+++ b/gcc/testsuite/gcc.dg/pic-4.c
@@ -1,7 +1,11 @@
 /* { dg-do compile { target { ! { *-*-darwin* hppa*64*-*-* mips*-*-linux-* amdgcn*-*-* } } } } */
 /* { dg-options "-fno-PIC" } */
 
-#ifdef __PIC__
+#if defined(__CYGWIN__) || defined(__WIN32__)
+# if __PIC__ != 1
+#  error __PIC__ is not 1!
+# endif
+#elif __PIC__
 # error __PIC__ is defined!
 #endif

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-03-15  0:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-15  0:11 [gcc r13-6678] gcc/testsuite/gcc.dg: Fix pic test case for PE targets Jonathan Yong

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