From 631da28efeba4841e8d40d8bf6f8fe259b33574e Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Mon, 10 Nov 2014 16:30:50 +0000 Subject: [PATCH] ptx testsuite fixes for issues like indirect jumps and jump labels. * lib/target-supports.exp (check_effective_target_indirect_jumps): New function. (check_effective_target_nonlocal_goto): New function. (check_effective_target_label_values): New function. * gcc.c-torture/execute/20071220-2.c: Require label_values. * gcc.c-torture/compile/labels-2.c: Likewise. * gcc.c-torture/compile/20000518-1.c: Likewise. * gcc.c-torture/compile/20021108-1.c: Likewise. * gcc.c-torture/compile/981006-1.c: Likewise. * gcc.c-torture/execute/20040302-1.c: Likewise. * gcc.dg/torture/pr33848.c: Likewise. * gcc.c-torture/compile/pr46107.c: Require indirect jumps and label values. * gcc.c-torture/compile/pr32919.c: Likewise. * gcc.c-torture/compile/pr17913.c: Likewise. * gcc.c-torture/compile/pr51495.c: Likewise. * gcc.c-torture/compile/pr25224.c: Likewise. * gcc.c-torture/compile/labels-3.c: Likewise. * gcc.c-torture/compile/pr27863.c: Likewise. * gcc.c-torture/compile/20050510-1.c: Likewise. * gcc.c-torture/compile/pr28489.c: Likewise. * gcc.c-torture/compile/pr29128.c: Likewise. * gcc.c-torture/compile/pr21356: Likewise. * gcc.c-torture/execute/20071210-1.c: Likewise. * gcc.c-torture/execute/200701220-1.c: Likewise. * gcc.c-torture/execute/pr51447.c: Likewise. * gcc.c-torture/execute/comp-goto-1.c: Likewise. * gcc.c-torture/execute/comp-goto-2.c: Likewise. * gcc.dg/20021029-1.c: Likewise. * gcc.dg/pr43379.c: Likewise. * gcc.dg/pr45259.c: Likewise. * gcc.dg/torture/pr53695.c: Likewise. * gcc.dg/torture/pr57584.c: Likewise. * gcc.c-torture/execute/980526-1.c: Skip if -O0 and neither label_values or indirect_jumps are available. * gcc.c-torture/compile/920415-1.c: Likewise. Remove NO_LABEL_VALUES test. * gcc.c-torture/compile/920428-3.c: Likewise. * gcc.c-torture/compile/950613-1.c: Likewise. * gcc.c-torture/compile/pr30984.c: Require indirect jumps. * gcc.c-torture/compile/991213-3.c: Likewise. * gcc.c-torture/compile/920825-1.c: Likewise. * gcc.c-torture/compile/20011029-1.c: Likewise. * gcc.c-torture/compile/complex-6.c: Likewise. * gcc.c-torture/compile/pr27127.c: Likewise. * gcc.c-torture/compile/pr58164.c: Likewise. * gcc.c-torture/compile/20041214-1.c: Likewise. * gcc.c-torture/execute/built-in-setjmp.c: Likewise. * gcc.c-torture/execute/pr56982.c: Likewise. * gcc.c-torture/execute/pr60003.c: Likewise. * gcc.c-torture/execute/pr26983.c: Likewise. * gcc.dg/pr57287-2.c: Likewise. * gcc.dg/pr59920-1.c: Likewise. * gcc.dg/pr59920-2.c: Likewise. * gcc.dg/pr59920-3.c: Likewise. * gcc.dg/setjmp-3.c: Likewise. * gcc.dg/setjmp-4.c: Likewise. * gcc.dg/setjmp-5.c: Likewise. * gcc.dg/torture/pr48542.c: Likewise. * gcc.dg/torture/pr57147-2.c: Likewise. * gcc.dg/torture/pr59993.c: Likewise. * gcc.dg/torture/stackalign/non-local-goto-1.c: Require nonlocal_goto. * gcc.dg/torture/stackalign/non-local-goto-2.c: Likewise. * gcc.dg/torture/stackalign/non-local-goto-3.c: Likewise. * gcc.dg/torture/stackalign/non-local-goto-4.c: Likewise. * gcc.dg/torture/stackalign/non-local-goto-5.c: Likewise. * gcc.dg/torture/stackalign/setjmp-1.c: Likewise. * gcc.dg/torture/stackalign/setjmp-3.c: Likewise. * gcc.dg/torture/stackalign/setjmp-4.c: Likewise. * gcc.dg/non-local-goto-1.c: Likewise. * gcc.dg/non-local-goto-2.c: Likewise. * gcc.dg/pr49994-1.c: Likewise. * gcc.dg/torture/pr57036-2.c: Likewise. * gcc.c-torture/compile/20040614-1.c: Require label_values. Remove NO_LABEL_VALUES test. * gcc.c-torture/compile/920831-1.c: Likewise. * gcc.c-torture/compile/920502-1.c: Likewise. * gcc.c-torture/compile/920501-7.c: Likewise. * gcc.dg/pr52139.c: Likewise. From-SVN: r217299 --- gcc/testsuite/ChangeLog | 85 +++++++++++++++++++ .../gcc.c-torture/compile/20000518-1.c | 2 + .../gcc.c-torture/compile/20011029-1.c | 2 + .../gcc.c-torture/compile/20021108-1.c | 2 + .../gcc.c-torture/compile/20040614-1.c | 8 +- .../gcc.c-torture/compile/20050510-1.c | 3 + .../gcc.c-torture/compile/920415-1.c | 7 +- .../gcc.c-torture/compile/920428-3.c | 7 +- .../gcc.c-torture/compile/920501-7.c | 6 +- .../gcc.c-torture/compile/920502-1.c | 2 + .../gcc.c-torture/compile/920826-1.c | 2 + .../gcc.c-torture/compile/920831-1.c | 2 + .../gcc.c-torture/compile/950613-1.c | 7 +- .../gcc.c-torture/compile/981006-1.c | 1 + .../gcc.c-torture/compile/991213-3.c | 2 + .../gcc.c-torture/compile/complex-6.c | 1 + .../gcc.c-torture/compile/labels-2.c | 2 + .../gcc.c-torture/compile/labels-3.c | 2 + gcc/testsuite/gcc.c-torture/compile/pr17913.c | 3 + gcc/testsuite/gcc.c-torture/compile/pr21356.c | 3 + gcc/testsuite/gcc.c-torture/compile/pr21728.c | 2 + gcc/testsuite/gcc.c-torture/compile/pr25224.c | 3 + gcc/testsuite/gcc.c-torture/compile/pr27863.c | 3 + gcc/testsuite/gcc.c-torture/compile/pr28489.c | 3 + gcc/testsuite/gcc.c-torture/compile/pr29128.c | 3 + gcc/testsuite/gcc.c-torture/compile/pr30984.c | 2 + gcc/testsuite/gcc.c-torture/compile/pr32919.c | 3 + gcc/testsuite/gcc.c-torture/compile/pr42559.c | 2 + gcc/testsuite/gcc.c-torture/compile/pr46107.c | 2 + gcc/testsuite/gcc.c-torture/compile/pr51495.c | 2 + gcc/testsuite/gcc.c-torture/compile/pr58164.c | 1 + .../gcc.c-torture/execute/20040302-1.c | 1 + .../gcc.c-torture/execute/20041214-1.c | 2 + .../gcc.c-torture/execute/20071210-1.c | 2 + .../gcc.c-torture/execute/20071220-1.c | 2 + .../gcc.c-torture/execute/20071220-2.c | 1 + .../gcc.c-torture/execute/980526-1.c | 2 + .../gcc.c-torture/execute/built-in-setjmp.c | 1 + gcc/testsuite/gcc.c-torture/execute/pr51447.c | 2 + gcc/testsuite/gcc.c-torture/execute/pr56982.c | 1 + gcc/testsuite/gcc.c-torture/execute/pr60003.c | 1 + gcc/testsuite/gcc.dg/20021029-1.c | 2 + gcc/testsuite/gcc.dg/comp-goto-1.c | 2 + gcc/testsuite/gcc.dg/comp-goto-2.c | 2 + gcc/testsuite/gcc.dg/non-local-goto-1.c | 1 + gcc/testsuite/gcc.dg/non-local-goto-2.c | 1 + gcc/testsuite/gcc.dg/pr26983.c | 1 + gcc/testsuite/gcc.dg/pr43379.c | 2 + gcc/testsuite/gcc.dg/pr45259.c | 2 + gcc/testsuite/gcc.dg/pr49994-1.c | 1 + gcc/testsuite/gcc.dg/pr52139.c | 1 + gcc/testsuite/gcc.dg/pr57287-2.c | 1 + gcc/testsuite/gcc.dg/pr57287.c | 1 + gcc/testsuite/gcc.dg/pr59920-1.c | 1 + gcc/testsuite/gcc.dg/pr59920-2.c | 2 + gcc/testsuite/gcc.dg/pr59920-3.c | 1 + gcc/testsuite/gcc.dg/setjmp-3.c | 1 + gcc/testsuite/gcc.dg/setjmp-4.c | 1 + gcc/testsuite/gcc.dg/setjmp-5.c | 1 + gcc/testsuite/gcc.dg/torture/pr33848.c | 1 + gcc/testsuite/gcc.dg/torture/pr48542.c | 2 + gcc/testsuite/gcc.dg/torture/pr53695.c | 2 + gcc/testsuite/gcc.dg/torture/pr57036-2.c | 1 + gcc/testsuite/gcc.dg/torture/pr57147-2.c | 1 + gcc/testsuite/gcc.dg/torture/pr57584.c | 2 + gcc/testsuite/gcc.dg/torture/pr59993.c | 1 + .../torture/stackalign/non-local-goto-1.c | 1 + .../torture/stackalign/non-local-goto-2.c | 1 + .../torture/stackalign/non-local-goto-3.c | 1 + .../torture/stackalign/non-local-goto-4.c | 1 + .../torture/stackalign/non-local-goto-5.c | 1 + .../gcc.dg/torture/stackalign/setjmp-1.c | 1 + .../gcc.dg/torture/stackalign/setjmp-3.c | 1 + .../gcc.dg/torture/stackalign/setjmp-4.c | 1 + gcc/testsuite/lib/target-supports.exp | 31 +++++++ 75 files changed, 243 insertions(+), 20 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ef35dbfdd16..241034d6220 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,90 @@ 2014-11-10 Bernd Schmidt + * lib/target-supports.exp (check_effective_target_indirect_jumps): + New function. + (check_effective_target_nonlocal_goto): New function. + (check_effective_target_label_values): New function. + * gcc.c-torture/execute/20071220-2.c: Require label_values. + * gcc.c-torture/compile/labels-2.c: Likewise. + * gcc.c-torture/compile/20000518-1.c: Likewise. + * gcc.c-torture/compile/20021108-1.c: Likewise. + * gcc.c-torture/compile/981006-1.c: Likewise. + * gcc.c-torture/execute/20040302-1.c: Likewise. + * gcc.dg/torture/pr33848.c: Likewise. + + * gcc.c-torture/compile/pr46107.c: Require indirect jumps and + label values. + * gcc.c-torture/compile/pr32919.c: Likewise. + * gcc.c-torture/compile/pr17913.c: Likewise. + * gcc.c-torture/compile/pr51495.c: Likewise. + * gcc.c-torture/compile/pr25224.c: Likewise. + * gcc.c-torture/compile/labels-3.c: Likewise. + * gcc.c-torture/compile/pr27863.c: Likewise. + * gcc.c-torture/compile/20050510-1.c: Likewise. + * gcc.c-torture/compile/pr28489.c: Likewise. + * gcc.c-torture/compile/pr29128.c: Likewise. + * gcc.c-torture/compile/pr21356: Likewise. + * gcc.c-torture/execute/20071210-1.c: Likewise. + * gcc.c-torture/execute/200701220-1.c: Likewise. + * gcc.c-torture/execute/pr51447.c: Likewise. + * gcc.c-torture/execute/comp-goto-1.c: Likewise. + * gcc.c-torture/execute/comp-goto-2.c: Likewise. + * gcc.dg/20021029-1.c: Likewise. + * gcc.dg/pr43379.c: Likewise. + * gcc.dg/pr45259.c: Likewise. + * gcc.dg/torture/pr53695.c: Likewise. + * gcc.dg/torture/pr57584.c: Likewise. + + * gcc.c-torture/execute/980526-1.c: Skip if -O0 and neither label_values + or indirect_jumps are available. + * gcc.c-torture/compile/920415-1.c: Likewise. Remove NO_LABEL_VALUES + test. + * gcc.c-torture/compile/920428-3.c: Likewise. + * gcc.c-torture/compile/950613-1.c: Likewise. + + * gcc.c-torture/compile/pr30984.c: Require indirect jumps. + * gcc.c-torture/compile/991213-3.c: Likewise. + * gcc.c-torture/compile/920825-1.c: Likewise. + * gcc.c-torture/compile/20011029-1.c: Likewise. + * gcc.c-torture/compile/complex-6.c: Likewise. + * gcc.c-torture/compile/pr27127.c: Likewise. + * gcc.c-torture/compile/pr58164.c: Likewise. + * gcc.c-torture/compile/20041214-1.c: Likewise. + * gcc.c-torture/execute/built-in-setjmp.c: Likewise. + * gcc.c-torture/execute/pr56982.c: Likewise. + * gcc.c-torture/execute/pr60003.c: Likewise. + * gcc.c-torture/execute/pr26983.c: Likewise. + * gcc.dg/pr57287-2.c: Likewise. + * gcc.dg/pr59920-1.c: Likewise. + * gcc.dg/pr59920-2.c: Likewise. + * gcc.dg/pr59920-3.c: Likewise. + * gcc.dg/setjmp-3.c: Likewise. + * gcc.dg/setjmp-4.c: Likewise. + * gcc.dg/setjmp-5.c: Likewise. + * gcc.dg/torture/pr48542.c: Likewise. + * gcc.dg/torture/pr57147-2.c: Likewise. + * gcc.dg/torture/pr59993.c: Likewise. + + * gcc.dg/torture/stackalign/non-local-goto-1.c: Require nonlocal_goto. + * gcc.dg/torture/stackalign/non-local-goto-2.c: Likewise. + * gcc.dg/torture/stackalign/non-local-goto-3.c: Likewise. + * gcc.dg/torture/stackalign/non-local-goto-4.c: Likewise. + * gcc.dg/torture/stackalign/non-local-goto-5.c: Likewise. + * gcc.dg/torture/stackalign/setjmp-1.c: Likewise. + * gcc.dg/torture/stackalign/setjmp-3.c: Likewise. + * gcc.dg/torture/stackalign/setjmp-4.c: Likewise. + * gcc.dg/non-local-goto-1.c: Likewise. + * gcc.dg/non-local-goto-2.c: Likewise. + * gcc.dg/pr49994-1.c: Likewise. + * gcc.dg/torture/pr57036-2.c: Likewise. + + * gcc.c-torture/compile/20040614-1.c: Require label_values. Remove + NO_LABEL_VALUES test. + * gcc.c-torture/compile/920831-1.c: Likewise. + * gcc.c-torture/compile/920502-1.c: Likewise. + * gcc.c-torture/compile/920501-7.c: Likewise. + * gcc.dg/pr52139.c: Likewise. + * lib/target-supports.exp (check_effective_target_trampolines, check_profiling_available, check_effective_target_lto, check_effective_target_vect_natural): False for nvptx-*-*. diff --git a/gcc/testsuite/gcc.c-torture/compile/20000518-1.c b/gcc/testsuite/gcc.c-torture/compile/20000518-1.c index d2087796a84..4034932b1da 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20000518-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20000518-1.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target label_values } */ + void callit1(void*); extern __inline__ void test() diff --git a/gcc/testsuite/gcc.c-torture/compile/20011029-1.c b/gcc/testsuite/gcc.c-torture/compile/20011029-1.c index 3b2bcdf2e9d..538b4e4f4be 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20011029-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20011029-1.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target indirect_jumps } */ + void foo (void *) __attribute__ ((noreturn)); void diff --git a/gcc/testsuite/gcc.c-torture/compile/20021108-1.c b/gcc/testsuite/gcc.c-torture/compile/20021108-1.c index 01b6e4ed7aa..3ac5d2eb799 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20021108-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20021108-1.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target label_values } */ + int main() { diff --git a/gcc/testsuite/gcc.c-torture/compile/20040614-1.c b/gcc/testsuite/gcc.c-torture/compile/20040614-1.c index d99d2789664..b692ab569f2 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20040614-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20040614-1.c @@ -1,4 +1,5 @@ -#ifndef NO_LABEL_VALUES +/* { dg-require-effective-target label_values } */ + void f(int r1, int *fp) { void *hlbl_tbl[] = { &&label1 }; @@ -14,7 +15,6 @@ void f(int r1, int *fp) goto label0; label2: ; -} -#else +} + int x; -#endif diff --git a/gcc/testsuite/gcc.c-torture/compile/20050510-1.c b/gcc/testsuite/gcc.c-torture/compile/20050510-1.c index 3570f4f35b4..84f198fa8f7 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20050510-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20050510-1.c @@ -1,3 +1,6 @@ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ + void bar (int k) { void *label = (k) ? &&x : &&y; diff --git a/gcc/testsuite/gcc.c-torture/compile/920415-1.c b/gcc/testsuite/gcc.c-torture/compile/920415-1.c index 1636adeaf44..96ac7fe9be4 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920415-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920415-1.c @@ -1,7 +1,9 @@ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ + extern void abort (void); extern void exit (int); -#ifndef NO_LABEL_VALUES f () { __label__ l; @@ -15,6 +17,3 @@ f () l: exit (0); } -#else -int x; -#endif diff --git a/gcc/testsuite/gcc.c-torture/compile/920428-3.c b/gcc/testsuite/gcc.c-torture/compile/920428-3.c index 13640c98ad2..0e9031e6fea 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920428-3.c +++ b/gcc/testsuite/gcc.c-torture/compile/920428-3.c @@ -1,5 +1,4 @@ -#ifndef NO_LABEL_VALUES +/* { dg-require-effective-target label_values } */ +/* { dg-require-effective-target indirect_jumps } */ + x(a){static void*j[]={&&l1,&&l2};goto*j[a];l1:return 0;l2:return 1;} -#else -main(){ exit (0); } -#endif diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-7.c b/gcc/testsuite/gcc.c-torture/compile/920501-7.c index aed88045e54..2af15e3b7ec 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-7.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-7.c @@ -1,5 +1,3 @@ -#ifndef NO_LABEL_VALUES +/* { dg-require-effective-target label_values } */ + x(){if(&&e-&&b<0)x();b:goto*&&b;e:;} -#else -int x; -#endif diff --git a/gcc/testsuite/gcc.c-torture/compile/920502-1.c b/gcc/testsuite/gcc.c-torture/compile/920502-1.c index b576c6c990c..ec2405a7b63 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920502-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920502-1.c @@ -1 +1,3 @@ +/* { dg-require-effective-target indirect_jumps } */ + extern void*t[];x(i){goto*t[i];} diff --git a/gcc/testsuite/gcc.c-torture/compile/920826-1.c b/gcc/testsuite/gcc.c-torture/compile/920826-1.c index d19eff2cec6..c2d8843c824 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920826-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920826-1.c @@ -1 +1,3 @@ +/* { dg-require-effective-target indirect_jumps } */ + f(int*x){goto*(char)*x;} diff --git a/gcc/testsuite/gcc.c-torture/compile/920831-1.c b/gcc/testsuite/gcc.c-torture/compile/920831-1.c index ff2fd6360bf..9e422a98bec 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920831-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920831-1.c @@ -1 +1,3 @@ +/* { dg-require-effective-target indirect_jumps } */ + f(x){goto*(char)x;} diff --git a/gcc/testsuite/gcc.c-torture/compile/950613-1.c b/gcc/testsuite/gcc.c-torture/compile/950613-1.c index 8aa757f476c..595f9efd8b4 100644 --- a/gcc/testsuite/gcc.c-torture/compile/950613-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/950613-1.c @@ -1,4 +1,6 @@ -#ifndef NO_LABEL_VALUES +/* { dg-require-effective-target label_values } */ +/* { dg-require-effective-target indirect_jumps } */ + f () { long *sp; @@ -26,6 +28,3 @@ f () goto *pc++; } } -#else -int x; -#endif diff --git a/gcc/testsuite/gcc.c-torture/compile/981006-1.c b/gcc/testsuite/gcc.c-torture/compile/981006-1.c index d77c115f214..9c6687552ee 100644 --- a/gcc/testsuite/gcc.c-torture/compile/981006-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/981006-1.c @@ -7,6 +7,7 @@ /* For MIPS at least, pic is needed to trigger the problem. */ /* { dg-options "-w -Wuninitialized -Werror -fpic" } */ /* { dg-options "-w -Wuninitialized -Werror" { target { { rs6000-*-aix* powerpc*-*-aix* arm*-*-* fr30-*-* sh-*-hms h8300*-*-* cris-*-elf* mmix-*-* } || { ! fpic } } } } */ +/* { dg-require-effective-target label_values } */ int foo (int a, int b) { diff --git a/gcc/testsuite/gcc.c-torture/compile/991213-3.c b/gcc/testsuite/gcc.c-torture/compile/991213-3.c index ce8347f5ddf..bda7490abb7 100644 --- a/gcc/testsuite/gcc.c-torture/compile/991213-3.c +++ b/gcc/testsuite/gcc.c-torture/compile/991213-3.c @@ -1,2 +1,4 @@ +/* { dg-require-effective-target indirect_jumps } */ + int jump () { goto * (int (*) ()) 0xbabebec0; } diff --git a/gcc/testsuite/gcc.c-torture/compile/complex-6.c b/gcc/testsuite/gcc.c-torture/compile/complex-6.c index eb89040abf3..9724bf27863 100644 --- a/gcc/testsuite/gcc.c-torture/compile/complex-6.c +++ b/gcc/testsuite/gcc.c-torture/compile/complex-6.c @@ -1,4 +1,5 @@ /* PR tree-opt/35737 */ +/* { dg-require-effective-target indirect_jumps } */ long buf[10]; diff --git a/gcc/testsuite/gcc.c-torture/compile/labels-2.c b/gcc/testsuite/gcc.c-torture/compile/labels-2.c index cf4f116e6a8..316a380b3ce 100644 --- a/gcc/testsuite/gcc.c-torture/compile/labels-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/labels-2.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target label_values } */ + struct bp { void *v, *b, *e; }; f () { diff --git a/gcc/testsuite/gcc.c-torture/compile/labels-3.c b/gcc/testsuite/gcc.c-torture/compile/labels-3.c index 51ac88380b8..6a0f7c23927 100644 --- a/gcc/testsuite/gcc.c-torture/compile/labels-3.c +++ b/gcc/testsuite/gcc.c-torture/compile/labels-3.c @@ -1,4 +1,6 @@ /* Verify that we can narrow the storage associated with label diffs. */ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ int foo (int a) { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr17913.c b/gcc/testsuite/gcc.c-torture/compile/pr17913.c index 30654a395d6..cf58700d4a0 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr17913.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr17913.c @@ -1,4 +1,7 @@ /* Test for computed jump into cond_expr: bug 17913. */ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ + void f (void) { void *p = &&a; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr21356.c b/gcc/testsuite/gcc.c-torture/compile/pr21356.c index b072b516518..229108f037d 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr21356.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr21356.c @@ -1,3 +1,6 @@ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ + int a; void* p; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr21728.c b/gcc/testsuite/gcc.c-torture/compile/pr21728.c index 991cb3886f8..d37f44bd68b 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr21728.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr21728.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target indirect_jumps } */ + int main (void) { __label__ l1; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr25224.c b/gcc/testsuite/gcc.c-torture/compile/pr25224.c index 0ccf0cdf333..56f46986242 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr25224.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr25224.c @@ -1,4 +1,7 @@ /* { dg-options "-funswitch-loops" } */ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ + static float rgam; extern void *jmp(void *); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr27863.c b/gcc/testsuite/gcc.c-torture/compile/pr27863.c index 86abc06860d..926312e4cea 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr27863.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr27863.c @@ -1,4 +1,7 @@ /* This test used to ICE on IA64. */ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ + long stack[100]; int main(int argc,char**argv,char **envp) { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr28489.c b/gcc/testsuite/gcc.c-torture/compile/pr28489.c index 766880fef25..60d23b18faa 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr28489.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr28489.c @@ -1,3 +1,6 @@ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ + typedef int c_int; union c_insn { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr29128.c b/gcc/testsuite/gcc.c-torture/compile/pr29128.c index 2afeae3ce22..3358b470198 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr29128.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr29128.c @@ -1,3 +1,6 @@ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ + typedef unsigned long Eterm; process_main (void) { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr30984.c b/gcc/testsuite/gcc.c-torture/compile/pr30984.c index 265a6f3616b..befe977149a 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr30984.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr30984.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target indirect_jumps } */ + int fs_exec(int ino) { void *src = 0; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr32919.c b/gcc/testsuite/gcc.c-torture/compile/pr32919.c index 33956c8c0b2..204c6a6126e 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr32919.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr32919.c @@ -1,3 +1,6 @@ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ + void _IO_vfprintf_internal ( char *f ) { static const void *const step0_jumps[] = { &&do_form_unknown, &&do_flag_plus, &&do_form_float }; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr42559.c b/gcc/testsuite/gcc.c-torture/compile/pr42559.c index 25f7fd6e85c..60475e13e20 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr42559.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr42559.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target label_values } */ + void jumpfunc(int copy, void *p) { void *l = &&jumplabel; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr46107.c b/gcc/testsuite/gcc.c-torture/compile/pr46107.c index 41582b8a161..5c4a8da9daa 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr46107.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr46107.c @@ -1,4 +1,6 @@ /* PR tree-optimization/46107 */ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ int foo (void) __attribute__ ((noreturn)); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr51495.c b/gcc/testsuite/gcc.c-torture/compile/pr51495.c index 34de37b5309..13b16419cb6 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr51495.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr51495.c @@ -1,4 +1,6 @@ /* PR rtl-optimization/51495 */ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ void bar (void); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58164.c b/gcc/testsuite/gcc.c-torture/compile/pr58164.c index 7fe24fa439f..5af751e0a21 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr58164.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr58164.c @@ -1,4 +1,5 @@ /* PR tree-optimization/58164 */ +/* { dg-require-effective-target indirect_jumps } */ int foo (void) diff --git a/gcc/testsuite/gcc.c-torture/execute/20040302-1.c b/gcc/testsuite/gcc.c-torture/execute/20040302-1.c index 07056c43f4e..10bc133e7fc 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20040302-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20040302-1.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target label_values } */ int code[]={0,0,0,0,1}; void foo(int x) { diff --git a/gcc/testsuite/gcc.c-torture/execute/20041214-1.c b/gcc/testsuite/gcc.c-torture/execute/20041214-1.c index 89df2be8e3a..6ce2dc063ec 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20041214-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20041214-1.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target indirect_jumps } */ + typedef long unsigned int size_t; extern void abort (void); extern char *strcpy (char *, const char *); diff --git a/gcc/testsuite/gcc.c-torture/execute/20071210-1.c b/gcc/testsuite/gcc.c-torture/execute/20071210-1.c index 0d113c008f7..79fa0a7f599 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20071210-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20071210-1.c @@ -1,4 +1,6 @@ /* PR rtl-optimization/34302 */ +/* { dg-require-effective-target label_values } */ +/* { dg-require-effective-target indirect_jumps } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.c-torture/execute/20071220-1.c b/gcc/testsuite/gcc.c-torture/execute/20071220-1.c index 00c2fa57bec..e832acc8492 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20071220-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20071220-1.c @@ -1,4 +1,6 @@ /* PR tree-optimization/29484 */ +/* { dg-require-effective-target label_values } */ +/* { dg-require-effective-target indirect_jumps } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.c-torture/execute/20071220-2.c b/gcc/testsuite/gcc.c-torture/execute/20071220-2.c index 93fa9de0275..6cd9bb50065 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20071220-2.c +++ b/gcc/testsuite/gcc.c-torture/execute/20071220-2.c @@ -1,4 +1,5 @@ /* PR tree-optimization/29484 */ +/* { dg-require-effective-target label_values } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.c-torture/execute/980526-1.c b/gcc/testsuite/gcc.c-torture/execute/980526-1.c index 57a910e4366..2c9e735da69 100644 --- a/gcc/testsuite/gcc.c-torture/execute/980526-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/980526-1.c @@ -1,3 +1,5 @@ +/* { dg-skip-if "requires indirect jumps" { ! indirect_jumps } { "-O0" } { "" } } */ +/* { dg-skip-if "requires label values" { ! label_values } { "-O0" } { "" } } */ int expect_do1 = 1, expect_do2 = 2; static int doit(int x){ diff --git a/gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c b/gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c index 4370c3d07ae..137bfc5ec6b 100644 --- a/gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c +++ b/gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target indirect_jumps } */ /* { dg-require-effective-target alloca } */ extern int strcmp(const char *, const char *); diff --git a/gcc/testsuite/gcc.c-torture/execute/pr51447.c b/gcc/testsuite/gcc.c-torture/execute/pr51447.c index 7b71a2642ad..887ddb7d067 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr51447.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr51447.c @@ -1,4 +1,6 @@ /* PR rtl-optimization/51447 */ +/* { dg-require-effective-target label_values } */ +/* { dg-require-effective-target indirect_jumps } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.c-torture/execute/pr56982.c b/gcc/testsuite/gcc.c-torture/execute/pr56982.c index c7da2affc1c..0fa9c8ab4ba 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr56982.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr56982.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target indirect_jumps } */ #include extern void abort (void); diff --git a/gcc/testsuite/gcc.c-torture/execute/pr60003.c b/gcc/testsuite/gcc.c-torture/execute/pr60003.c index 94d9cf88698..92bcc565980 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr60003.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr60003.c @@ -1,4 +1,5 @@ /* PR tree-optimization/60003 */ +/* { dg-require-effective-target indirect_jumps } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/20021029-1.c b/gcc/testsuite/gcc.dg/20021029-1.c index bc330c56f49..9da8e81575b 100644 --- a/gcc/testsuite/gcc.dg/20021029-1.c +++ b/gcc/testsuite/gcc.dg/20021029-1.c @@ -4,6 +4,8 @@ /* { dg-options "-O2 -fpic" } */ /* { dg-options "-O2 -fpic -mpt-fixed" { target sh64*-*-* } } */ /* { dg-final { scan-assembler-not ".data.rel.ro.local" } } */ +/* { dg-require-effective-target label_values } */ +/* { dg-require-effective-target indirect_jumps } */ int foo (int a) { diff --git a/gcc/testsuite/gcc.dg/comp-goto-1.c b/gcc/testsuite/gcc.dg/comp-goto-1.c index 66afac87b9f..39baae534d8 100644 --- a/gcc/testsuite/gcc.dg/comp-goto-1.c +++ b/gcc/testsuite/gcc.dg/comp-goto-1.c @@ -3,6 +3,8 @@ /* Origin: Joseph Myers */ /* { dg-do compile } */ /* { dg-options "" } */ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ void f (void) diff --git a/gcc/testsuite/gcc.dg/comp-goto-2.c b/gcc/testsuite/gcc.dg/comp-goto-2.c index 85b0049fd46..54c21119276 100644 --- a/gcc/testsuite/gcc.dg/comp-goto-2.c +++ b/gcc/testsuite/gcc.dg/comp-goto-2.c @@ -3,6 +3,8 @@ /* Origin: Joseph Myers */ /* { dg-do compile } */ /* { dg-options "-pedantic" } */ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ void f (void) diff --git a/gcc/testsuite/gcc.dg/non-local-goto-1.c b/gcc/testsuite/gcc.dg/non-local-goto-1.c index 9c2e6cc09c0..c8202c9908a 100644 --- a/gcc/testsuite/gcc.dg/non-local-goto-1.c +++ b/gcc/testsuite/gcc.dg/non-local-goto-1.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ +/* { dg-require-effective-target nonlocal_goto } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/non-local-goto-2.c b/gcc/testsuite/gcc.dg/non-local-goto-2.c index 99fb1052e69..aa8d63a27c5 100644 --- a/gcc/testsuite/gcc.dg/non-local-goto-2.c +++ b/gcc/testsuite/gcc.dg/non-local-goto-2.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ +/* { dg-require-effective-target nonlocal_goto } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/pr26983.c b/gcc/testsuite/gcc.dg/pr26983.c index 5e2120a1ffe..fc919551d8b 100644 --- a/gcc/testsuite/gcc.dg/pr26983.c +++ b/gcc/testsuite/gcc.dg/pr26983.c @@ -1,4 +1,5 @@ /* { dg-do link } */ +/* { dg-require-effective-target indirect_jumps } */ /* This used to cause a linker failure because GCC would output assembler code referencing labels that it had not output. */ diff --git a/gcc/testsuite/gcc.dg/pr43379.c b/gcc/testsuite/gcc.dg/pr43379.c index da4e6ba67ad..e4c3eb55a14 100644 --- a/gcc/testsuite/gcc.dg/pr43379.c +++ b/gcc/testsuite/gcc.dg/pr43379.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -ftracer -w" } */ +/* { dg-require-effective-target label_values } */ +/* { dg-require-effective-target indirect_jumps } */ void *foo(int i, int *p) { diff --git a/gcc/testsuite/gcc.dg/pr45259.c b/gcc/testsuite/gcc.dg/pr45259.c index 3b8d6bd176d..7a051af8110 100644 --- a/gcc/testsuite/gcc.dg/pr45259.c +++ b/gcc/testsuite/gcc.dg/pr45259.c @@ -2,6 +2,8 @@ /* { dg-do compile } */ /* { dg-options "-g -O2 -w -fpic" { target fpic } } */ /* { dg-options "-g -O2 -w" { target { ! fpic } } } */ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ struct S { void (*bar) (long); }; struct T { struct S *t; }; diff --git a/gcc/testsuite/gcc.dg/pr49994-1.c b/gcc/testsuite/gcc.dg/pr49994-1.c index 902466110a5..62ac23bfc37 100644 --- a/gcc/testsuite/gcc.dg/pr49994-1.c +++ b/gcc/testsuite/gcc.dg/pr49994-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-Os -fsched2-use-superblocks -g" } */ +/* { dg-require-effective-target nonlocal_goto } */ void x (int a) { diff --git a/gcc/testsuite/gcc.dg/pr52139.c b/gcc/testsuite/gcc.dg/pr52139.c index bd654a2f151..b2a08a623ad 100644 --- a/gcc/testsuite/gcc.dg/pr52139.c +++ b/gcc/testsuite/gcc.dg/pr52139.c @@ -2,6 +2,7 @@ /* { dg-do compile } */ /* { dg-options "-O -fno-tree-dominator-opts -fno-tree-fre" } */ /* { dg-additional-options "-fpic" { target fpic } } */ +/* { dg-require-effective-target label_values } */ void *p; diff --git a/gcc/testsuite/gcc.dg/pr57287-2.c b/gcc/testsuite/gcc.dg/pr57287-2.c index 1ddf76c6461..7d13464e27a 100644 --- a/gcc/testsuite/gcc.dg/pr57287-2.c +++ b/gcc/testsuite/gcc.dg/pr57287-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -Wall" } */ +/* { dg-require-effective-target indirect_jumps } */ #include diff --git a/gcc/testsuite/gcc.dg/pr57287.c b/gcc/testsuite/gcc.dg/pr57287.c index 72225b11931..7ca0f8bc0a3 100644 --- a/gcc/testsuite/gcc.dg/pr57287.c +++ b/gcc/testsuite/gcc.dg/pr57287.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -Wall" } */ +/* { dg-require-effective-target indirect_jumps } */ #include diff --git a/gcc/testsuite/gcc.dg/pr59920-1.c b/gcc/testsuite/gcc.dg/pr59920-1.c index 3e60d37ae20..a2f07276700 100644 --- a/gcc/testsuite/gcc.dg/pr59920-1.c +++ b/gcc/testsuite/gcc.dg/pr59920-1.c @@ -1,6 +1,7 @@ /* PR tree-optimization/59920 */ /* { dg-do compile } */ /* { dg-options "-O0" } */ +/* { dg-require-effective-target indirect_jumps } */ #include diff --git a/gcc/testsuite/gcc.dg/pr59920-2.c b/gcc/testsuite/gcc.dg/pr59920-2.c index bee5542748b..f22691324bc 100644 --- a/gcc/testsuite/gcc.dg/pr59920-2.c +++ b/gcc/testsuite/gcc.dg/pr59920-2.c @@ -1,6 +1,8 @@ /* PR tree-optimization/59920 */ /* { dg-do compile } */ /* { dg-options "-O0" } */ +/* { dg-require-effective-target label_values } */ +/* { dg-require-effective-target indirect_jumps } */ void *bar (void **); void *baz (int, void **); diff --git a/gcc/testsuite/gcc.dg/pr59920-3.c b/gcc/testsuite/gcc.dg/pr59920-3.c index 2159504e363..e1749c72b1d 100644 --- a/gcc/testsuite/gcc.dg/pr59920-3.c +++ b/gcc/testsuite/gcc.dg/pr59920-3.c @@ -1,6 +1,7 @@ /* PR tree-optimization/59920 */ /* { dg-do compile } */ /* { dg-options "-O0" } */ +/* { dg-require-effective-target nonlocal_goto } */ void *bar (void **); void *baz (int, void **); diff --git a/gcc/testsuite/gcc.dg/setjmp-3.c b/gcc/testsuite/gcc.dg/setjmp-3.c index 306861d25c3..75222420811 100644 --- a/gcc/testsuite/gcc.dg/setjmp-3.c +++ b/gcc/testsuite/gcc.dg/setjmp-3.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O" } */ +/* { dg-require-effective-target indirect_jumps } */ #include diff --git a/gcc/testsuite/gcc.dg/setjmp-4.c b/gcc/testsuite/gcc.dg/setjmp-4.c index 53bf0e8724a..20765f631d1 100644 --- a/gcc/testsuite/gcc.dg/setjmp-4.c +++ b/gcc/testsuite/gcc.dg/setjmp-4.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O" } */ +/* { dg-require-effective-target indirect_jumps } */ #include diff --git a/gcc/testsuite/gcc.dg/setjmp-5.c b/gcc/testsuite/gcc.dg/setjmp-5.c index c6e5f931746..584762915de 100644 --- a/gcc/testsuite/gcc.dg/setjmp-5.c +++ b/gcc/testsuite/gcc.dg/setjmp-5.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -Wall" } */ +/* { dg-require-effective-target indirect_jumps } */ #include diff --git a/gcc/testsuite/gcc.dg/torture/pr33848.c b/gcc/testsuite/gcc.dg/torture/pr33848.c index c3b85e9e576..5d71d2c933c 100644 --- a/gcc/testsuite/gcc.dg/torture/pr33848.c +++ b/gcc/testsuite/gcc.dg/torture/pr33848.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target label_values } */ /* &&foo should be hoisted, but on most targets, excess register pressure forces it to be rematerialized before "data != &&foo". On targets that have a "branch if registers are equal" instruction, this leads to the diff --git a/gcc/testsuite/gcc.dg/torture/pr48542.c b/gcc/testsuite/gcc.dg/torture/pr48542.c index e3e49489f7d..98cff00071d 100644 --- a/gcc/testsuite/gcc.dg/torture/pr48542.c +++ b/gcc/testsuite/gcc.dg/torture/pr48542.c @@ -1,4 +1,6 @@ /* { dg-do run } */ +/* { dg-require-effective-target indirect_jumps } */ + /* The return-address was clobbered. */ #include #include diff --git a/gcc/testsuite/gcc.dg/torture/pr53695.c b/gcc/testsuite/gcc.dg/torture/pr53695.c index eba0843c4a2..3f2bfaa9dca 100644 --- a/gcc/testsuite/gcc.dg/torture/pr53695.c +++ b/gcc/testsuite/gcc.dg/torture/pr53695.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-ftracer" } */ +/* { dg-require-effective-target indirect_jumps } */ +/* { dg-require-effective-target label_values } */ void foo (const void **p) diff --git a/gcc/testsuite/gcc.dg/torture/pr57036-2.c b/gcc/testsuite/gcc.dg/torture/pr57036-2.c index ceb47876d19..6e70d3bf79a 100644 --- a/gcc/testsuite/gcc.dg/torture/pr57036-2.c +++ b/gcc/testsuite/gcc.dg/torture/pr57036-2.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target nonlocal_goto } */ int j_; void g (void); diff --git a/gcc/testsuite/gcc.dg/torture/pr57147-2.c b/gcc/testsuite/gcc.dg/torture/pr57147-2.c index 521d126e3c7..087c2de15c6 100644 --- a/gcc/testsuite/gcc.dg/torture/pr57147-2.c +++ b/gcc/testsuite/gcc.dg/torture/pr57147-2.c @@ -1,6 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-fdump-tree-optimized" } */ /* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */ +/* { dg-require-effective-target indirect_jumps } */ struct __jmp_buf_tag {}; typedef struct __jmp_buf_tag jmp_buf[1]; diff --git a/gcc/testsuite/gcc.dg/torture/pr57584.c b/gcc/testsuite/gcc.dg/torture/pr57584.c index b527b047ab6..e4affb2e461 100644 --- a/gcc/testsuite/gcc.dg/torture/pr57584.c +++ b/gcc/testsuite/gcc.dg/torture/pr57584.c @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-require-effective-target int32plus } */ +/* { dg-require-effective-target label_values } */ +/* { dg-require-effective-target indirect_jumps } */ typedef int int32_t; typedef unsigned char uint8_t; diff --git a/gcc/testsuite/gcc.dg/torture/pr59993.c b/gcc/testsuite/gcc.dg/torture/pr59993.c index 833d923a302..57ecdde6938 100644 --- a/gcc/testsuite/gcc.dg/torture/pr59993.c +++ b/gcc/testsuite/gcc.dg/torture/pr59993.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target indirect_jumps } */ #include diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-1.c index 263d4486cf7..d006396a8eb 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-1.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-require-effective-target nonlocal_goto } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-2.c b/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-2.c index 5a64d541964..879992feec2 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-2.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-2.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-require-effective-target nonlocal_goto } */ extern void abort (void); diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-3.c b/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-3.c index 3afc8cc6a31..f18366f9c0f 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-3.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-3.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-require-effective-target nonlocal_goto } */ #ifndef NO_TRAMPOLINES extern void abort (void); 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 d9bc6dec6f4..d3057236490 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,4 +1,5 @@ /* { dg-do run } */ +/* { dg-require-effective-target nonlocal_goto } */ extern void abort (void); extern void exit (int); 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 0fee82960de..b034a655ad0 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,4 +1,5 @@ /* { dg-do run } */ +/* { dg-require-effective-target nonlocal_goto } */ extern void exit (int); #if !defined (NO_LABEL_VALUES) && !defined (NO_TRAMPOLINES) diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-1.c b/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-1.c index 6ab67e395fb..13cc300584b 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-1.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-1.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-require-effective-target indirect_jumps } */ extern int strcmp(const char *, const char *); extern char *strcpy(char *, const char *); diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-3.c b/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-3.c index fee0d281ffa..2f9840c14a7 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-3.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-3.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-require-effective-target indirect_jumps } */ #include diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-4.c b/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-4.c index d1671223adb..b180130c406 100644 --- a/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-4.c +++ b/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-4.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-require-effective-target indirect_jumps } */ #include diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index f2bf6390e5d..123f074040d 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -601,6 +601,37 @@ proc add_options_for_tls { flags } { return $flags } +# Return 1 if indirect jumps are supported, 0 otherwise. + +proc check_effective_target_indirect_jumps {} { + if { [istarget nvptx-*-*] } { + return 0 + } + return 1 +} + +# Return 1 if nonlocal goto is supported, 0 otherwise. + +proc check_effective_target_nonlocal_goto {} { + if { [istarget nvptx-*-*] } { + return 0 + } + return 1 +} + +# Return 1 if taking label values is supported, 0 otherwise. + +proc check_effective_target_label_values {} { + if { [istarget nvptx-*-*] } { + return 0 + } + return [check_no_compiler_messages label_values assembly { + #ifdef NO_LABEL_VALUES + #error NO + #endif + }] +} + # Return 1 if the assembler does not verify function types against # calls, 0 otherwise. Such verification will typically show up problems # with K&R C function declarations. -- 2.30.2