From patchwork Tue Jun 6 09:23:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 771731 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3whmT12bG0z9s74 for ; Tue, 6 Jun 2017 19:23:32 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="vRXU1dOf"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=d09g73HC2b2gmNe59so1/1UAnWfd26r676qXbWy4XaDwQ64bOX QwmZph9vVd47gyhPPbN6gc7Ytt6SFU/R1eBuILP22e6ry5cY1yipq+JG6RcwAHSr lyIQVeVgGmIwIjtxtgAP6VeL8v7wc9cQlorrK9Ge2ux5MYcy9r/uwwA/E= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=AaVPZr6dEbUGcCalan5gs5aA2w8=; b=vRXU1dOfFgTdoLS74A6+ mevfR5Gw4YX9yZDP0oMF/ZRK4J2bIuIx7enW4afZnFzVIqnmvrOYZp6+tAoZIqff 8C00TBGEVFczYxVdZXH79c4CSf3oAK7ZormPJ+q5u+Tkn2TN3qTdVLXywQ7FPhHX 4AoyUSfj01fiR35Kv3QJxsM= Received: (qmail 70765 invoked by alias); 6 Jun 2017 09:23:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 70744 invoked by uid 89); 6 Jun 2017 09:23:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy=1979, doit, vries, therein X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 06 Jun 2017 09:23:10 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-MBX-04.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1dIAhj-0001Im-SU from Tom_deVries@mentor.com for gcc-patches@gcc.gnu.org; Tue, 06 Jun 2017 02:23:12 -0700 Received: from [127.0.0.1] (137.202.0.87) by SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 6 Jun 2017 10:23:07 +0100 To: GCC Patches From: Tom de Vries Subject: [PATCH, testsuite] Remove NO_LABEL_VALUES Message-ID: Date: Tue, 6 Jun 2017 11:23:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To SVR-IES-MBX-04.mgc.mentorg.com (139.181.222.4) Hi, this patch removes the additional_flags=-DNO_LABEL_VALUES addition, and instead uses the effective target label_values (introduced here: https://gcc.gnu.org/ml/gcc-patches/2014-10/msg02087.html ). Tested on x86_64. Tested on nvptx. Tested on nvptx with the '[istarget nvptx-*-*]' clause removed from the test in check_effective_target_label_values, to make sure we trigger the '[target_info exists gcc,no_label_values]' clause. Am I overlooking a test configuration here? OK for trunk? Thanks, - Tom Remove NO_LABEL_VALUES 2017-06-01 Tom de Vries * doc/sourcebuild.texi (Testsuites, C Language Testsuites, gcc.c-torture/compile): Remove mention of NO_LABEL_VALUES in fixme. * gcc.c-torture/compile/20000326-2.c: Use dg-require-effective-target label_values instead of NO_LABEL_VALUES. * gcc.c-torture/compile/920301-1.c: Same. * gcc.c-torture/compile/920501-1.c: Same. * gcc.c-torture/compile/941014-4.c: Same. * gcc.c-torture/compile/labels-1.c: Same. * gcc.c-torture/compile/pr18903.c: Same. * gcc.c-torture/execute/920302-1.c: Same. * gcc.c-torture/execute/920415-1.c: Same. * gcc.c-torture/execute/920428-2.c: Same. * gcc.c-torture/execute/920501-3.c: Same. * gcc.c-torture/execute/920501-4.c: Same. * gcc.c-torture/execute/920501-5.c: Same. * gcc.c-torture/execute/920501-7.c: Same. * gcc.c-torture/execute/920721-4.c: Same. * gcc.c-torture/execute/980526-1.c: Same. * gcc.c-torture/execute/990208-1.c: Same. * gcc.c-torture/execute/comp-goto-1.c: Same. * gcc.c-torture/execute/comp-goto-2.c: Same. * gcc.dg/torture/stackalign/comp-goto-1.c: Same. * gcc.dg/torture/stackalign/non-local-goto-4.c: Same. * gcc.dg/torture/stackalign/non-local-goto-5.c: Same. * gcc.dg/tree-prof/comp-goto-1.c: Same. * gcc.dg/tree-prof/pr44777.c: Same. * gcc.misc-tests/bprob-2.c: Same. * gcc.misc-tests/gcov-3.c: Same. * lib/gcc.exp (gcc_target_compile): Remove appending of -DNO_LABEL_VALUES to additional_flags. * lib/objc.exp (objc_target_compile): Same. * lib/target-supports.exp (check_effective_target_label_values): Test on 'target_info exists gcc,no_label_values' instead of NO_LABEL_VALUES. --- gcc/doc/sourcebuild.texi | 2 +- gcc/testsuite/gcc.c-torture/compile/20000326-2.c | 7 ++----- gcc/testsuite/gcc.c-torture/compile/920301-1.c | 4 ++-- gcc/testsuite/gcc.c-torture/compile/920501-1.c | 6 ++---- gcc/testsuite/gcc.c-torture/compile/941014-4.c | 6 ++---- gcc/testsuite/gcc.c-torture/compile/labels-1.c | 6 ++---- gcc/testsuite/gcc.c-torture/compile/pr18903.c | 6 ++---- gcc/testsuite/gcc.c-torture/execute/920302-1.c | 6 ++---- gcc/testsuite/gcc.c-torture/execute/920415-1.c | 5 +---- gcc/testsuite/gcc.c-torture/execute/920428-2.c | 4 +++- gcc/testsuite/gcc.c-torture/execute/920501-3.c | 9 ++------- gcc/testsuite/gcc.c-torture/execute/920501-4.c | 7 ++----- gcc/testsuite/gcc.c-torture/execute/920501-5.c | 6 ++---- gcc/testsuite/gcc.c-torture/execute/920501-7.c | 6 ++++-- gcc/testsuite/gcc.c-torture/execute/920721-4.c | 6 ++---- gcc/testsuite/gcc.c-torture/execute/980526-1.c | 8 ++------ gcc/testsuite/gcc.c-torture/execute/990208-1.c | 7 ++----- gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c | 4 +++- gcc/testsuite/gcc.c-torture/execute/comp-goto-2.c | 6 ++++-- gcc/testsuite/gcc.dg/torture/stackalign/comp-goto-1.c | 5 +++-- gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-4.c | 5 +++-- gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c | 3 ++- gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c | 3 ++- gcc/testsuite/gcc.dg/tree-prof/pr44777.c | 5 +++-- gcc/testsuite/gcc.misc-tests/bprob-2.c | 4 ++-- gcc/testsuite/gcc.misc-tests/gcov-3.c | 4 ++-- gcc/testsuite/lib/gcc.exp | 3 --- gcc/testsuite/lib/objc.exp | 3 --- gcc/testsuite/lib/target-supports.exp | 9 +++------ 29 files changed, 62 insertions(+), 93 deletions(-) diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index bb5b6b9..841e75a 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -2604,7 +2604,7 @@ you wish to test for the presence or absence of compiler warnings. While special options can be set, and tests disabled on specific platforms, by the use of @file{.x} files, mostly these test cases should not contain platform dependencies. FIXME: discuss how defines -such as @code{NO_LABEL_VALUES} and @code{STACK_SIZE} are used. +such as @code{STACK_SIZE} are used. @item gcc.c-torture/execute This testsuite contains test cases that should compile, link and run; otherwise the same comments as for @file{gcc.c-torture/compile} apply. diff --git a/gcc/testsuite/gcc.c-torture/compile/20000326-2.c b/gcc/testsuite/gcc.c-torture/compile/20000326-2.c index 055260f..6578d4e 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20000326-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/20000326-2.c @@ -1,4 +1,5 @@ -#ifndef NO_LABEL_VALUES +/* { dg-require-effective-target label_values } */ + extern int printk(const char *fmt, ...); void foo (int x, int y) @@ -7,7 +8,3 @@ void foo (int x, int y) here: printk ("", &&here); } - -#else -int x; -#endif diff --git a/gcc/testsuite/gcc.c-torture/compile/920301-1.c b/gcc/testsuite/gcc.c-torture/compile/920301-1.c index c4d663e..b61fe93 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920301-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920301-1.c @@ -1,4 +1,4 @@ -#ifndef NO_LABEL_VALUES +/* { dg-require-effective-target label_values } */ + f(){static void*t[]={&&x};x:;} -#endif g(){static unsigned p[5];} diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-1.c b/gcc/testsuite/gcc.c-torture/compile/920501-1.c index 29e1973..84cc122 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-1.c @@ -1,5 +1,3 @@ -#ifndef NO_LABEL_VALUES +/* { dg-require-effective-target label_values } */ + a(){int**b[]={&&c};c:;} -#else -int x; -#endif diff --git a/gcc/testsuite/gcc.c-torture/compile/941014-4.c b/gcc/testsuite/gcc.c-torture/compile/941014-4.c index 9e673f3..9c4cec8 100644 --- a/gcc/testsuite/gcc.c-torture/compile/941014-4.c +++ b/gcc/testsuite/gcc.c-torture/compile/941014-4.c @@ -1,4 +1,5 @@ -#ifndef NO_LABEL_VALUES +/* { dg-require-effective-target label_values } */ + f (int *re) { int *loops = 0, *loope = 0; @@ -11,6 +12,3 @@ f (int *re) if (dat0 & 1) re[(dat0 >> 2) & 3] = 0; } -#else -int x; -#endif diff --git a/gcc/testsuite/gcc.c-torture/compile/labels-1.c b/gcc/testsuite/gcc.c-torture/compile/labels-1.c index fae6ab8..7889567 100644 --- a/gcc/testsuite/gcc.c-torture/compile/labels-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/labels-1.c @@ -1,4 +1,5 @@ -#ifndef NO_LABEL_VALUES +/* { dg-require-effective-target label_values } */ + f () { void *x = &&L2; @@ -8,6 +9,3 @@ f () L2: abort (); L3:; } -#else -int x; -#endif diff --git a/gcc/testsuite/gcc.c-torture/compile/pr18903.c b/gcc/testsuite/gcc.c-torture/compile/pr18903.c index 3c12351..461504f 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr18903.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr18903.c @@ -1,8 +1,9 @@ +/* { dg-require-effective-target label_values } */ + /* We were ICEing in bsi_after_labels because we had a BB which did not have a lablel. PR middle-end/18903 */ -#ifndef NO_LABEL_VALUES void g (int s, int f) { &&ff; @@ -12,6 +13,3 @@ void g (int s, int f) f = s; end:; } -#else -int g; -#endif diff --git a/gcc/testsuite/gcc.c-torture/execute/920302-1.c b/gcc/testsuite/gcc.c-torture/execute/920302-1.c index 44a1e9b..62e4fc2 100644 --- a/gcc/testsuite/gcc.c-torture/execute/920302-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/920302-1.c @@ -1,9 +1,10 @@ +/* { dg-require-effective-target label_values } */ + short optab[5]; char buf[10]; execute (ip) register short *ip; { -#ifndef NO_LABEL_VALUES register void *base = &&x; char *bp = buf; static void *tab[] = {&&x, &&y, &&z}; @@ -21,9 +22,6 @@ y: *bp++='y'; z: *bp++='z'; *bp=0; return; -#else - strcpy (buf, "xyxyz"); -#endif } short p[5]; diff --git a/gcc/testsuite/gcc.c-torture/execute/920415-1.c b/gcc/testsuite/gcc.c-torture/execute/920415-1.c index 2d6335a..ec31ea9 100644 --- a/gcc/testsuite/gcc.c-torture/execute/920415-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/920415-1.c @@ -1,5 +1,2 @@ -#ifndef NO_LABEL_VALUES +/* { dg-require-effective-target label_values } */ main(){__label__ l;void*x(){return&&l;}goto*x();abort();return;l:exit(0);} -#else -main(){ exit (0); } -#endif diff --git a/gcc/testsuite/gcc.c-torture/execute/920428-2.c b/gcc/testsuite/gcc.c-torture/execute/920428-2.c index f8c2e5f..99a3925 100644 --- a/gcc/testsuite/gcc.c-torture/execute/920428-2.c +++ b/gcc/testsuite/gcc.c-torture/execute/920428-2.c @@ -1,4 +1,6 @@ -#if !defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) +/* { dg-require-effective-target label_values } */ + +#if !defined (NO_TRAMPOLINES) s(i){if(i>0){__label__ l1;int f(int i){if(i==2)goto l1;return 0;}return f(i);l1:;}return 1;} x(){return s(0)==1&&s(1)==0&&s(2)==1;} main(){if(x()!=1)abort();exit(0);} diff --git a/gcc/testsuite/gcc.c-torture/execute/920501-3.c b/gcc/testsuite/gcc.c-torture/execute/920501-3.c index 1031d73..452d7c0 100644 --- a/gcc/testsuite/gcc.c-torture/execute/920501-3.c +++ b/gcc/testsuite/gcc.c-torture/execute/920501-3.c @@ -1,8 +1,9 @@ +/* { dg-require-effective-target label_values } */ + int tab[9]; execute(oip, ip) unsigned short *oip, *ip; { -#ifndef NO_LABEL_VALUES int x = 0; int *xp = tab; base: @@ -14,12 +15,6 @@ base: } *xp++ = ip - oip; goto *(&&base + *ip++); -#else - tab[0] = 0; - tab[1] = 1; - tab[2] = 2; - tab[3] = 0; -#endif } main() diff --git a/gcc/testsuite/gcc.c-torture/execute/920501-4.c b/gcc/testsuite/gcc.c-torture/execute/920501-4.c index 3524dd5..c998570 100644 --- a/gcc/testsuite/gcc.c-torture/execute/920501-4.c +++ b/gcc/testsuite/gcc.c-torture/execute/920501-4.c @@ -1,4 +1,5 @@ -#ifndef NO_LABEL_VALUES +/* { dg-require-effective-target label_values } */ + int x (int i) { @@ -21,7 +22,3 @@ main (void) exit (0); } -#else -int -main (void) { exit (0); } -#endif diff --git a/gcc/testsuite/gcc.c-torture/execute/920501-5.c b/gcc/testsuite/gcc.c-torture/execute/920501-5.c index e352a91..f0b9071 100644 --- a/gcc/testsuite/gcc.c-torture/execute/920501-5.c +++ b/gcc/testsuite/gcc.c-torture/execute/920501-5.c @@ -1,4 +1,5 @@ -#ifndef NO_LABEL_VALUES +/* { dg-require-effective-target label_values } */ + x (int i) { void *j[] = {&&x, &&y, &&z}; @@ -14,6 +15,3 @@ main () abort(); exit(0); } -#else -main(){ exit (0); } -#endif diff --git a/gcc/testsuite/gcc.c-torture/execute/920501-7.c b/gcc/testsuite/gcc.c-torture/execute/920501-7.c index c23717d..ea8f931 100644 --- a/gcc/testsuite/gcc.c-torture/execute/920501-7.c +++ b/gcc/testsuite/gcc.c-torture/execute/920501-7.c @@ -1,10 +1,12 @@ +/* { dg-require-effective-target label_values } */ + #ifdef STACK_SIZE #define DEPTH ((STACK_SIZE) / 512 + 1) #else #define DEPTH 1000 #endif -#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) +#if !defined (NO_TRAMPOLINES) x(a) { __label__ xlab; @@ -22,7 +24,7 @@ x(a) main () { -#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) +#if !defined (NO_TRAMPOLINES) if (x (DEPTH) != DEPTH) abort (); #endif diff --git a/gcc/testsuite/gcc.c-torture/execute/920721-4.c b/gcc/testsuite/gcc.c-torture/execute/920721-4.c index 3cccc5b..805918b 100644 --- a/gcc/testsuite/gcc.c-torture/execute/920721-4.c +++ b/gcc/testsuite/gcc.c-torture/execute/920721-4.c @@ -1,4 +1,5 @@ -#ifndef NO_LABEL_VALUES +/* { dg-require-effective-target label_values } */ + int try (int num) { __label__ lab1, lab2, lab3, lab4, lab5, lab6, default_lab; @@ -55,6 +56,3 @@ main() } exit(0); } -#else -main(){ exit (0); } -#endif diff --git a/gcc/testsuite/gcc.c-torture/execute/980526-1.c b/gcc/testsuite/gcc.c-torture/execute/980526-1.c index 2c9e735..15c5807 100644 --- a/gcc/testsuite/gcc.c-torture/execute/980526-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/980526-1.c @@ -1,5 +1,5 @@ -/* { dg-skip-if "requires indirect jumps" { ! indirect_jumps } { "-O0" } { "" } } */ -/* { dg-skip-if "requires label values" { ! label_values } { "-O0" } { "" } } */ +/* { dg-require-effective-target label_values } */ + int expect_do1 = 1, expect_do2 = 2; static int doit(int x){ @@ -31,9 +31,5 @@ static void do2(void){ } int main(void){ -#ifndef NO_LABEL_VALUES - do1(); - do2(); -#endif exit(0); } diff --git a/gcc/testsuite/gcc.c-torture/execute/990208-1.c b/gcc/testsuite/gcc.c-torture/execute/990208-1.c index 786e664..15dcdfb 100644 --- a/gcc/testsuite/gcc.c-torture/execute/990208-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/990208-1.c @@ -1,8 +1,9 @@ +/* { dg-require-effective-target label_values } */ + /* As a quality of implementation issue, we should not prevent inlining of function explicitly marked inline just because a label therein had its address taken. */ -#ifndef NO_LABEL_VALUES static void *ptr1, *ptr2; static int i = 1; @@ -44,7 +45,3 @@ int main() } void bar(void) { } - -#else /* NO_LABEL_VALUES */ -int main() { exit(0); } -#endif diff --git a/gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c b/gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c index 4c41b71..d01f96b 100644 --- a/gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/comp-goto-1.c @@ -1,6 +1,8 @@ +/* { dg-require-effective-target label_values } */ + #include -#if !defined(NO_LABEL_VALUES) && (!defined(STACK_SIZE) || STACK_SIZE >= 4000) && __INT_MAX__ >= 2147483647 +#if (!defined(STACK_SIZE) || STACK_SIZE >= 4000) && __INT_MAX__ >= 2147483647 typedef unsigned int uint32; typedef signed int sint32; diff --git a/gcc/testsuite/gcc.c-torture/execute/comp-goto-2.c b/gcc/testsuite/gcc.c-torture/execute/comp-goto-2.c index 771cd95..1b594db 100644 --- a/gcc/testsuite/gcc.c-torture/execute/comp-goto-2.c +++ b/gcc/testsuite/gcc.c-torture/execute/comp-goto-2.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target label_values } */ + /* A slight variation of 920501-7.c. */ #ifdef STACK_SIZE @@ -6,7 +8,7 @@ #define DEPTH 1000 #endif -#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) +#if !defined (NO_TRAMPOLINES) x(a) { __label__ xlab; @@ -28,7 +30,7 @@ x(a) main () { -#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) +#if !defined (NO_TRAMPOLINES) if (x (DEPTH) != DEPTH) abort (); #endif diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/comp-goto-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/comp-goto-1.c index cf16372..1129b00 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/comp-goto-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/comp-goto-1.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-require-effective-target label_values } */ #ifdef STACK_SIZE #define DEPTH ((STACK_SIZE) / 512 + 1) @@ -9,7 +10,7 @@ extern void abort (void); extern void exit (int); -#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) +#if !defined (NO_TRAMPOLINES) int x(int a) { @@ -33,7 +34,7 @@ x(int a) int main () { -#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) +#if !defined (NO_TRAMPOLINES) if (x (DEPTH) != DEPTH) abort (); #endif diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-4.c b/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-4.c index d305723..bcad887 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-4.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-4.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-require-effective-target nonlocal_goto } */ +/* { dg-require-effective-target label_values } */ extern void abort (void); extern void exit (int); @@ -10,7 +11,7 @@ extern void exit (int); #define DEPTH 1000 #endif -#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) +#if !defined (NO_TRAMPOLINES) int x(int a) { @@ -30,7 +31,7 @@ x(int a) int main () { -#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) +#if !defined (NO_TRAMPOLINES) if (x (DEPTH) != DEPTH) abort (); #endif diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c b/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c index b034a65..ab524fe 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c @@ -1,8 +1,9 @@ /* { dg-do run } */ /* { dg-require-effective-target nonlocal_goto } */ +/* { dg-require-effective-target label_values } */ extern void exit (int); -#if !defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) +#if !defined (NO_TRAMPOLINES) extern void abort (void); int s(int i){if(i>0){__label__ l1;int f(int i){if(i==2)goto l1;return 0;}return f(i);l1:;}return 1;} int x(){return s(0)==1&&s(1)==0&&s(2)==1;} diff --git a/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c b/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c index 42d61f3..86e88ad 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c @@ -1,8 +1,9 @@ /* { dg-require-effective-target freorder } */ +/* { dg-require-effective-target label_values } */ /* { dg-options "-O2 -freorder-blocks-and-partition" } */ #include -#if !defined(NO_LABEL_VALUES) && (!defined(STACK_SIZE) || STACK_SIZE >= 4000) && __INT_MAX__ >= 2147483647 +#if (!defined(STACK_SIZE) || STACK_SIZE >= 4000) && __INT_MAX__ >= 2147483647 typedef unsigned int uint32; typedef signed int sint32; diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr44777.c b/gcc/testsuite/gcc.dg/tree-prof/pr44777.c index 1c4da7f..4550599 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/pr44777.c +++ b/gcc/testsuite/gcc.dg/tree-prof/pr44777.c @@ -1,4 +1,5 @@ /* PR middle-end/44777 */ +/* { dg-require-effective-target label_values } */ /* { dg-options "-O0" } */ /* A variant of gcc.c-torture/execute/comp-goto-2.c. */ @@ -11,7 +12,7 @@ extern void exit (int); #define DEPTH 1000 #endif -#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) +#if !defined (NO_TRAMPOLINES) int x (int a) { @@ -35,7 +36,7 @@ x (int a) int main () { -#if ! defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) +#if !defined (NO_TRAMPOLINES) if (x (DEPTH) != DEPTH) abort (); #endif diff --git a/gcc/testsuite/gcc.misc-tests/bprob-2.c b/gcc/testsuite/gcc.misc-tests/bprob-2.c index e0931f3..90ed7d7 100644 --- a/gcc/testsuite/gcc.misc-tests/bprob-2.c +++ b/gcc/testsuite/gcc.misc-tests/bprob-2.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target label_values } */ + /* Test profile-directed block ordering with computed gotos. * This is the same as test gcc.c-torture/execute/980526-1.c and @@ -37,9 +39,7 @@ static void do2(void){ } int main(void){ -#ifndef NO_LABEL_VALUES do1(); do2(); -#endif exit(0); } diff --git a/gcc/testsuite/gcc.misc-tests/gcov-3.c b/gcc/testsuite/gcc.misc-tests/gcov-3.c index fcccdee..eb6e4cc 100644 --- a/gcc/testsuite/gcc.misc-tests/gcov-3.c +++ b/gcc/testsuite/gcc.misc-tests/gcov-3.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target label_values } */ + /* Test Gcov with computed gotos. This is the same as test gcc.c-torture/execute/980526-1.c */ @@ -38,10 +40,8 @@ static void do2(void){ } int main(void){ /* count(1) */ -#ifndef NO_LABEL_VALUES do1(); do2(); -#endif exit(0); /* count(1) */ } diff --git a/gcc/testsuite/lib/gcc.exp b/gcc/testsuite/lib/gcc.exp index 846e4e2..19d500c 100644 --- a/gcc/testsuite/lib/gcc.exp +++ b/gcc/testsuite/lib/gcc.exp @@ -147,9 +147,6 @@ proc gcc_target_compile { source dest type options } { if [target_info exists gcc,no_trampolines] { lappend options "additional_flags=-DNO_TRAMPOLINES" } - if [target_info exists gcc,no_label_values] { - lappend options "additional_flags=-DNO_LABEL_VALUES" - } if [target_info exists gcc,signal_suppress] { lappend options "additional_flags=-DSIGNAL_SUPPRESS" } diff --git a/gcc/testsuite/lib/objc.exp b/gcc/testsuite/lib/objc.exp index 65d1839..c4c954e 100644 --- a/gcc/testsuite/lib/objc.exp +++ b/gcc/testsuite/lib/objc.exp @@ -197,9 +197,6 @@ proc objc_target_compile { source dest type options } { if [target_info exists objc,no_trampolines] { lappend options "additional_flags=-DNO_TRAMPOLINES" } - if [target_info exists objc,no_label_values] { - lappend options "additional_flags=-DNO_LABEL_VALUES" - } # TEST_ALWAYS_FLAGS are flags that should be passed to every # compilation. They are passed first to allow individual diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index ded6383..8b99f35 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -749,14 +749,11 @@ proc check_effective_target_global_constructor {} { # Return 1 if taking label values is supported, 0 otherwise. proc check_effective_target_label_values {} { - if { [istarget nvptx-*-*] } { + if { [istarget nvptx-*-*] || [target_info exists gcc,no_label_values] } { return 0 } - return [check_no_compiler_messages label_values assembly { - #ifdef NO_LABEL_VALUES - #error NO - #endif - }] + + return 1 } # Return 1 if builtin_return_address and builtin_frame_address are