From patchwork Tue Dec 22 21:18:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 1419479 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D0q346nV2z9sT5 for ; Wed, 23 Dec 2020 08:19:10 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EF6453877036; Tue, 22 Dec 2020 21:19:07 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from rock.gnat.com (rock.gnat.com [205.232.38.15]) by sourceware.org (Postfix) with ESMTP id 1397D387084D for ; Tue, 22 Dec 2020 21:19:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1397D387084D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oliva@adacore.com Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id DB256116C60; Tue, 22 Dec 2020 16:19:04 -0500 (EST) X-Virus-Scanned: Debian amavisd-new at gnat.com Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id eYsmULxp6mCz; Tue, 22 Dec 2020 16:19:04 -0500 (EST) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id 9F85B116C0E; Tue, 22 Dec 2020 16:19:04 -0500 (EST) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id 0BMLIuig056315 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 22 Dec 2020 18:18:57 -0300 From: Alexandre Oliva To: gcc-patches@gcc.gnu.org Subject: mark some tests in gcc.target/arm as requiring "fpic" support Organization: Free thinker, does not speak for AdaCore Date: Tue, 22 Dec 2020 18:18:56 -0300 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joel Brobecker Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Require effective target fpic support in tests using pic flags. Regstrapped on x86_64-linux-gnu, and tested with -x-arm-wrs-vxworks7r2. I understand we have pre-approval for the addition of such pic requirement markers, so I'm going to give this some 24 hours for any objections to be raised, and proceed to install it otherwise. from Joel Brobecker for gcc/testsuite/ChangeLog * gcc.target/arm/data-rel-1.c: Require "fpic" support. * gcc.target/arm/data-rel-2.c: Likewise. * gcc.target/arm/data-rel-3.c: Ditto. * gcc.target/arm/pr44788.c: Ditto. * gcc.target/arm/pr52006.c: Ditto. * gcc.target/arm/pr59858.c: Ditto. * gcc.target/arm/tlscall.c: Ditto. * gcc.target/arm/require-pic-register-loc.c: Ditto. Adjust line numbers. --- gcc/testsuite/gcc.target/arm/data-rel-1.c | 1 + gcc/testsuite/gcc.target/arm/data-rel-2.c | 1 + gcc/testsuite/gcc.target/arm/data-rel-3.c | 1 + gcc/testsuite/gcc.target/arm/pr44788.c | 1 + gcc/testsuite/gcc.target/arm/pr52006.c | 1 + gcc/testsuite/gcc.target/arm/pr59858.c | 1 + .../gcc.target/arm/require-pic-register-loc.c | 17 +++++++++-------- gcc/testsuite/gcc.target/arm/tlscall.c | 1 + 8 files changed, 16 insertions(+), 8 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/data-rel-1.c b/gcc/testsuite/gcc.target/arm/data-rel-1.c index a09e235c445ae..5931b44b9a6b1 100644 --- a/gcc/testsuite/gcc.target/arm/data-rel-1.c +++ b/gcc/testsuite/gcc.target/arm/data-rel-1.c @@ -1,5 +1,6 @@ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-fPIC -mno-pic-data-is-text-relative" } */ +/* { dg-require-effective-target fpic } */ /* { dg-final { scan-assembler-not "j-\\(.LPIC" } } */ /* { dg-final { scan-assembler-not "_GLOBAL_OFFSET_TABLE_-\\(.LPIC" } } */ /* { dg-final { scan-assembler "j\\(GOT\\)" } } */ diff --git a/gcc/testsuite/gcc.target/arm/data-rel-2.c b/gcc/testsuite/gcc.target/arm/data-rel-2.c index 56a54e818495b..3ed83e287f143 100644 --- a/gcc/testsuite/gcc.target/arm/data-rel-2.c +++ b/gcc/testsuite/gcc.target/arm/data-rel-2.c @@ -1,6 +1,7 @@ /* { dg-skip-if "Not supported in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-fPIC -mno-pic-data-is-text-relative -mno-single-pic-base" } */ +/* { dg-require-effective-target fpic } */ /* { dg-final { scan-assembler-not "j-\\(.LPIC" } } */ /* { dg-final { scan-assembler "_GLOBAL_OFFSET_TABLE_-\\(.LPIC" } } */ /* { dg-final { scan-assembler "j\\(GOT\\)" } } */ diff --git a/gcc/testsuite/gcc.target/arm/data-rel-3.c b/gcc/testsuite/gcc.target/arm/data-rel-3.c index 4ce904802570c..5ab6ba7a12cc6 100644 --- a/gcc/testsuite/gcc.target/arm/data-rel-3.c +++ b/gcc/testsuite/gcc.target/arm/data-rel-3.c @@ -1,6 +1,7 @@ /* { dg-skip-if "Not supported in FDPIC" { arm*-*-uclinuxfdpiceabi } "*" "" } */ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-fPIC -mpic-data-is-text-relative" } */ +/* { dg-require-effective-target fpic } */ /* { dg-final { scan-assembler "j-\\(.LPIC" } } */ /* { dg-final { scan-assembler-not "_GLOBAL_OFFSET_TABLE_-\\(.LPIC" } } */ /* { dg-final { scan-assembler-not "j\\(GOT\\)" } } */ diff --git a/gcc/testsuite/gcc.target/arm/pr44788.c b/gcc/testsuite/gcc.target/arm/pr44788.c index e69bbc603ed1f..470db320eaea6 100644 --- a/gcc/testsuite/gcc.target/arm/pr44788.c +++ b/gcc/testsuite/gcc.target/arm/pr44788.c @@ -2,6 +2,7 @@ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-require-effective-target arm_thumb2_ok } */ /* { dg-options "-Os -fno-strict-aliasing -fPIC -mthumb -march=armv7-a -mfpu=vfp3 -mfloat-abi=softfp" } */ +/* { dg-require-effective-target fpic } */ extern void foo (float *); diff --git a/gcc/testsuite/gcc.target/arm/pr52006.c b/gcc/testsuite/gcc.target/arm/pr52006.c index 136a39d81ad8a..f818818608702 100644 --- a/gcc/testsuite/gcc.target/arm/pr52006.c +++ b/gcc/testsuite/gcc.target/arm/pr52006.c @@ -4,6 +4,7 @@ /* { dg-skip-if "no support for hard-float VFP ABI" { arm_thumb1 } { "-march=*" } { "" } } */ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-march=armv7-a+fp -mfloat-abi=hard -O2 -fPIC" } */ +/* { dg-require-effective-target fpic } */ unsigned long a; static int b; diff --git a/gcc/testsuite/gcc.target/arm/pr59858.c b/gcc/testsuite/gcc.target/arm/pr59858.c index bcfd5d553e445..3360b48e85865 100644 --- a/gcc/testsuite/gcc.target/arm/pr59858.c +++ b/gcc/testsuite/gcc.target/arm/pr59858.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-march=armv5te -fno-builtin -mfloat-abi=soft -mthumb -fno-stack-protector -Os -fno-tree-loop-optimize -fno-tree-dominator-opts -fPIC -w" } */ +/* { dg-require-effective-target fpic } */ /* { dg-skip-if "Incompatible command line options: -mfloat-abi=soft -mfloat-abi=hard" { *-*-* } { "-mfloat-abi=hard" } { "" } } */ /* { dg-require-effective-target arm_arch_v5te_thumb_ok } */ diff --git a/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c b/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c index 9f089ee05e6fd..9c532f3ed4d30 100644 --- a/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c +++ b/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c @@ -1,15 +1,16 @@ /* { dg-do compile } */ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */ /* { dg-options "-g -fPIC" } */ +/* { dg-require-effective-target fpic } */ void *v; void a (void *x) { } void b (void) { } - /* line 8. */ -int /* line 9. */ -main (int argc) /* line 10. */ -{ /* line 11. */ - if (argc == 12345) /* line 12. */ + /* line 9. */ +int /* line 10. */ +main (int argc) /* line 11. */ +{ /* line 12. */ + if (argc == 12345) /* line 13. */ { a (v); return 1; @@ -19,12 +20,12 @@ main (int argc) /* line 10. */ return 0; } -/* { dg-final { scan-assembler-not "\.loc 1 8 \[0-9\]\+" } } */ /* { dg-final { scan-assembler-not "\.loc 1 9 \[0-9\]\+" } } */ /* { dg-final { scan-assembler-not "\.loc 1 10 \[0-9\]\+" } } */ +/* { dg-final { scan-assembler-not "\.loc 1 11 \[0-9\]\+" } } */ /* The loc at the start of the prologue. */ -/* { dg-final { scan-assembler-times "\.loc 1 11 \[0-9\]\+" 1 } } */ +/* { dg-final { scan-assembler-times "\.loc 1 12 \[0-9\]\+" 1 } } */ /* The loc at the end of the prologue, with the first user line. */ -/* { dg-final { scan-assembler-times "\.loc 1 12 \[0-9\]\+" 1 } } */ +/* { dg-final { scan-assembler-times "\.loc 1 13 \[0-9\]\+" 1 } } */ diff --git a/gcc/testsuite/gcc.target/arm/tlscall.c b/gcc/testsuite/gcc.target/arm/tlscall.c index 71366effa3e3b..8d5609ae13215 100644 --- a/gcc/testsuite/gcc.target/arm/tlscall.c +++ b/gcc/testsuite/gcc.target/arm/tlscall.c @@ -2,6 +2,7 @@ /* { dg-do assemble } */ /* { dg-options "-O2 -fPIC -mtls-dialect=gnu2" } */ +/* { dg-require-effective-target fpic } */ /* { dg-skip-if "FDPIC does not support gnu2 TLS dialect" { arm*-*-uclinuxfdpiceabi } "*" "" } */ /* { dg-skip-if "-mpure-code and -fPIC incompatible" { *-*-* } { "-mpure-code" } } */