This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, testsuite] Remove NO_LABEL_VALUES


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  <tom@codesourcery.com>

	* 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 <stdlib.h>
 
-#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 <stdlib.h>
 
-#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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]