From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1814) id 39CFE3858D33; Wed, 15 Mar 2023 00:11:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39CFE3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678839085; bh=0bJ5cRKGrc5ks+gR/5BoSjdLBYGyxjNhp4GVR9s0smY=; h=From:To:Subject:Date:From; b=trzrA1xYoutEKCPNSuWccxJspsODScyPtfK8TipTT2Lh7g6L843he9IaxeN9ZLOEg G4a9SbgEsm5wotCf3uWYt7/InTbNjbPc00XSKlSQKbmPWpK1N2pxpDpskfy7aiVWpz l5W35dZONujrWIyErYkI3TvTxbdPOmAntsoSUsI4= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Yong To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-6678] gcc/testsuite/gcc.dg: Fix pic test case for PE targets X-Act-Checkin: gcc X-Git-Author: Jonathan Yong <10walls@gmail.com> X-Git-Refname: refs/heads/master X-Git-Oldrev: cd5baeb4489b6a953abbc7f02fea457fd9ed2f83 X-Git-Newrev: 38945ee3b2884e5514272c4b41a507ebdfddbb3d Message-Id: <20230315001125.39CFE3858D33@sourceware.org> Date: Wed, 15 Mar 2023 00:11:25 +0000 (GMT) List-Id: 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