From: Tom de Vries Date: Tue, 6 Jun 2017 15:35:35 +0000 (+0000) Subject: Remove NO_LABEL_VALUES X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c6b519a32c3431fa5fde89db585ddc32eb83da2;p=gcc.git Remove NO_LABEL_VALUES 2017-06-06 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. From-SVN: r248923 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5b27621664b..5dd00df1af0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-06-06 Tom de Vries + + * doc/sourcebuild.texi (Testsuites, C Language Testsuites, + gcc.c-torture/compile): Remove mention of NO_LABEL_VALUES in fixme. + 2017-06-06 Kyrylo Tkachov * config/aarch64/atomics.md (atomic_compare_and_swap expander): diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index bb5b6b96158..841e75abbd8 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/ChangeLog b/gcc/testsuite/ChangeLog index 663f21e2b4a..70179fab050 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,37 @@ +2017-06-06 Tom de Vries + + * 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. + 2017-06-06 Kyrylo Tkachov * gcc.target/aarch64/atomic_cmp_exchange_zero_reg_1.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/compile/20000326-2.c b/gcc/testsuite/gcc.c-torture/compile/20000326-2.c index 055260f6e64..6578d4e41c6 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 c4d663eb8a7..b61fe93b554 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 29e197341aa..84cc122070b 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 9e673f37833..9c4cec8b7a0 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 fae6ab8f400..7889567ffa6 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 3c123511297..461504f611a 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 44a1e9b670e..62e4fc205a9 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 2d6335aea55..ec31ea94a52 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 f8c2e5f782c..99a39257496 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 1031d7378cb..452d7c0debe 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 3524dd5c8b2..c99857079aa 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 e352a915563..f0b90716653 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 c23717d797e..ea8f93191e1 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 3cccc5b3024..805918b2aa3 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 2c9e735da69..15c580791ab 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 786e664f35b..15dcdfbdf7a 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 4c41b71c344..d01f96ba70a 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 771cd956995..1b594db2758 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 cf163722de8..1129b00a49e 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 d3057236490..bcad887a93f 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 b034a655ad0..ab524fe3656 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 42d61f3cad6..86e88adb89d 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 1c4da7f5f7d..4550599a288 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 e0931f39c46..90ed7d74b8c 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 fcccdeeff41..eb6e4cc46bf 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 846e4e285f7..19d500c6a29 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 65d18395c44..c4c954e1db6 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 ded6383cc1f..8b99f355133 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