From fb61af8ba8c31ec8a5c9b03ea26c9f82b09519a8 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Mon, 10 Nov 2014 16:30:33 +0000 Subject: [PATCH] XFAILs and such for ptx. * lib/target-supports.exp (check_effective_target_trampolines, check_profiling_available, check_effective_target_lto, check_effective_target_vect_natural): False for nvptx-*-*. * gcc.c-torture/compile/limits-fndefn.c: Skip for nvptx-*-*. * gcc.c-torture/compile/pr34334.c: Likewise. * gcc.c-torture/compile/pr37056.c: Likewise. * gcc.c-torture/compile/pr39423-1.c: Likewise. * gcc.c-torture/compile/pr46534.c: Likewise. * gcc.c-torture/compile/pr49049.c: Likewise. * gcc.c-torture/compile/pr59417.c: Likewise. * gcc.c-torture/compile/20080721-1.c: Likewise. * gcc.c-torture/compile/920501-4.c: Likewise. * gcc.c-torture/compile/921011-1.c: Likewise. * gcc.dg/20040813-1.c: Likewise. * gcc.dg/pr28755.c: Likewise. * gcc.dg/pr44194-1.c: Likewise. * gcc.c-torture/compile/pr42717.c: Xfail for nvptx-*-*. * gcc.c-torture/compile/pr61684.c: Likewise. * gcc.c-torture/compile/pr20601-1.c: Likewise. * gcc.c-torture/compile/pr59221.c: Likewise. * gcc.c-torture/compile/20060208-1.c: Likewise. * gcc.c-torture/execute/pr52129.c: Likewise. * gcc.c-torture/execute/20020310-1.c: Likewise. * gcc.c-torture/execute/20101011-1.c: Define DO_TEST to 0 for nvptx. * gcc.c-torture/execute20020312-2.c: Add case for for nvptx. * gcc.c-torture/compile/pr60655-1.c: Don't add -fdata-sections for nvptx-*-*. * gcc.dg/pr36400.c: Xfail scan-assembler test on nvptx-*-*. * gcc.dg/const-elim-2.c: Likewise. From-SVN: r217298 --- gcc/testsuite/ChangeLog | 30 +++++++++++++++++++ .../gcc.c-torture/compile/20060208-1.c | 1 + .../gcc.c-torture/compile/20080721-1.c | 1 + .../gcc.c-torture/compile/920501-4.c | 1 + .../gcc.c-torture/compile/921011-1.c | 2 ++ .../gcc.c-torture/compile/limits-fndefn.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr34334.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr37056.c | 1 + .../gcc.c-torture/compile/pr39423-1.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr42717.c | 1 + gcc/testsuite/gcc.c-torture/compile/pr46534.c | 2 +- gcc/testsuite/gcc.c-torture/compile/pr49049.c | 2 ++ gcc/testsuite/gcc.c-torture/compile/pr59417.c | 1 + .../gcc.c-torture/compile/pr60655-1.c | 2 +- gcc/testsuite/gcc.c-torture/compile/pr61684.c | 1 + .../gcc.c-torture/execute/20101011-1.c | 3 ++ .../gcc.c-torture/execute/pr20601-1.c | 1 + gcc/testsuite/gcc.c-torture/execute/pr52129.c | 1 + gcc/testsuite/gcc.c-torture/execute/pr59221.c | 1 + gcc/testsuite/gcc.dg/20020310-1.c | 1 + gcc/testsuite/gcc.dg/20020312-2.c | 2 ++ gcc/testsuite/gcc.dg/20040813-1.c | 2 +- gcc/testsuite/gcc.dg/const-elim-2.c | 2 +- gcc/testsuite/gcc.dg/pr28755.c | 1 + gcc/testsuite/gcc.dg/pr44194-1.c | 2 +- gcc/testsuite/gcc.dg/torture/pr36400.c | 2 +- gcc/testsuite/lib/target-supports.exp | 8 ++++- 27 files changed, 67 insertions(+), 7 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8038759604b..ef35dbfdd16 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,35 @@ 2014-11-10 Bernd Schmidt + * lib/target-supports.exp (check_effective_target_trampolines, + check_profiling_available, check_effective_target_lto, + check_effective_target_vect_natural): False for nvptx-*-*. + * gcc.c-torture/compile/limits-fndefn.c: Skip for nvptx-*-*. + * gcc.c-torture/compile/pr34334.c: Likewise. + * gcc.c-torture/compile/pr37056.c: Likewise. + * gcc.c-torture/compile/pr39423-1.c: Likewise. + * gcc.c-torture/compile/pr46534.c: Likewise. + * gcc.c-torture/compile/pr49049.c: Likewise. + * gcc.c-torture/compile/pr59417.c: Likewise. + * gcc.c-torture/compile/20080721-1.c: Likewise. + * gcc.c-torture/compile/920501-4.c: Likewise. + * gcc.c-torture/compile/921011-1.c: Likewise. + * gcc.dg/20040813-1.c: Likewise. + * gcc.dg/pr28755.c: Likewise. + * gcc.dg/pr44194-1.c: Likewise. + * gcc.c-torture/compile/pr42717.c: Xfail for nvptx-*-*. + * gcc.c-torture/compile/pr61684.c: Likewise. + * gcc.c-torture/compile/pr20601-1.c: Likewise. + * gcc.c-torture/compile/pr59221.c: Likewise. + * gcc.c-torture/compile/20060208-1.c: Likewise. + * gcc.c-torture/execute/pr52129.c: Likewise. + * gcc.c-torture/execute/20020310-1.c: Likewise. + * gcc.c-torture/execute/20101011-1.c: Define DO_TEST to 0 for nvptx. + * gcc.c-torture/execute20020312-2.c: Add case for for nvptx. + * gcc.c-torture/compile/pr60655-1.c: Don't add -fdata-sections + for nvptx-*-*. + * gcc.dg/pr36400.c: Xfail scan-assembler test on nvptx-*-*. + * gcc.dg/const-elim-2.c: Likewise. + * lib/target-supports.exp (check_effective_target_untyped_assembly): New function. * gcc.c-torture/compile/20091215-1.c: Require untyped_assembly. diff --git a/gcc/testsuite/gcc.c-torture/compile/20060208-1.c b/gcc/testsuite/gcc.c-torture/compile/20060208-1.c index 01e471a7b0c..18724fb3ebe 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20060208-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20060208-1.c @@ -1,4 +1,5 @@ /* PR middle-end/26092 */ +/* { dg-skip-if "can't take address of malloc" { nvptx-*-* } { "*" } { "" } } */ typedef __SIZE_TYPE__ size_t; extern void *malloc (size_t); diff --git a/gcc/testsuite/gcc.c-torture/compile/20080721-1.c b/gcc/testsuite/gcc.c-torture/compile/20080721-1.c index 35ef352bc6d..6ee9ed95b93 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20080721-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20080721-1.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "can't read function data" { nvptx-*-* } { "*" } { "" } } */ void foo(void); void bar(void); diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-4.c b/gcc/testsuite/gcc.c-torture/compile/920501-4.c index 48314cc7898..362f2b764d8 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-4.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-4.c @@ -1,4 +1,5 @@ /* { dg-do assemble } */ +/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O1" } { "" } } */ foo () { diff --git a/gcc/testsuite/gcc.c-torture/compile/921011-1.c b/gcc/testsuite/gcc.c-torture/compile/921011-1.c index 6cc707dc74c..5955b4c527d 100644 --- a/gcc/testsuite/gcc.c-torture/compile/921011-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/921011-1.c @@ -1,3 +1,5 @@ +/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O1" } { "" } } */ + void fun (nb) int nb; diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c b/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c index 0b6e6c77567..228c5d9ef29 100644 --- a/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c +++ b/gcc/testsuite/gcc.c-torture/compile/limits-fndefn.c @@ -1,4 +1,5 @@ /* { dg-skip-if "too complex for avr" { avr-*-* } { "*" } { "" } } */ +/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "*" } { "" } } */ /* { dg-timeout-factor 4.0 } */ #define LIM1(x) x##0, x##1, x##2, x##3, x##4, x##5, x##6, x##7, x##8, x##9, #define LIM2(x) LIM1(x##0) LIM1(x##1) LIM1(x##2) LIM1(x##3) LIM1(x##4) \ diff --git a/gcc/testsuite/gcc.c-torture/compile/pr34334.c b/gcc/testsuite/gcc.c-torture/compile/pr34334.c index 30bb782626f..5fa60a35604 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr34334.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr34334.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "*" } { "-O0" } } */ __extension__ typedef __SIZE_TYPE__ size_t; __extension__ typedef long long int __quad_t; __extension__ typedef unsigned int __mode_t; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr37056.c b/gcc/testsuite/gcc.c-torture/compile/pr37056.c index f9285e2c784..e709fdc1ffb 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr37056.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr37056.c @@ -1,3 +1,4 @@ +/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O2" "-Os" } { "" } } */ extern void abort (void); static union { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr39423-1.c b/gcc/testsuite/gcc.c-torture/compile/pr39423-1.c index 34ebb66381a..c604738b9cb 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr39423-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr39423-1.c @@ -1,4 +1,5 @@ /* PR target/39423 */ +/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O2" } { "" } } */ int foo (const char *name, int nmlen, char *flags) diff --git a/gcc/testsuite/gcc.c-torture/compile/pr42717.c b/gcc/testsuite/gcc.c-torture/compile/pr42717.c index 4fe6f93e797..7f6fb9db5cf 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr42717.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr42717.c @@ -1,3 +1,4 @@ +/* { dg-xfail-if "ptxas crashes" { nvptx-*-* } { "-O0" } { "" } } */ static signed char foo (signed char si1, unsigned char si2) { diff --git a/gcc/testsuite/gcc.c-torture/compile/pr46534.c b/gcc/testsuite/gcc.c-torture/compile/pr46534.c index 67c8ad21ebf..8300ca7f2cf 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr46534.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr46534.c @@ -1,4 +1,4 @@ -/* { dg-skip-if "too big" { avr-*-* pdp11-*-* } { "*" } { "" } } */ +/* { dg-skip-if "too big" { avr-*-* nvptx-*-* pdp11-*-* } { "*" } { "" } } */ /* PR middle-end/46534 */ extern int printf (const char *, ...); diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49049.c b/gcc/testsuite/gcc.c-torture/compile/pr49049.c index a24b2a41c75..f396e056fb3 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr49049.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr49049.c @@ -1,3 +1,5 @@ +/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-Os" } { "" } } */ + __extension__ typedef unsigned long long int uint64_t; static int diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59417.c b/gcc/testsuite/gcc.c-torture/compile/pr59417.c index 227c5d84105..891ba66718a 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr59417.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr59417.c @@ -1,4 +1,5 @@ /* PR tree-optimization/59417 */ +/* { dg-skip-if "ptxas times out" { nvptx-*-* } { "-O1" "-O2" "-Os" } { "" } } */ int a, b, d; short c; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c b/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c index 1e1e460739a..31efb4ba822 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c @@ -1,4 +1,4 @@ -/* { dg-options "-fdata-sections" { target { ! { { hppa*-*-hpux* } && { ! lp64 } } } } } */ +/* { dg-options "-fdata-sections" { target { { ! { { hppa*-*-hpux* } && { ! lp64 } } } && { ! nvptx-*-* } } } } */ typedef unsigned char unit; typedef unit *unitptr; diff --git a/gcc/testsuite/gcc.c-torture/compile/pr61684.c b/gcc/testsuite/gcc.c-torture/compile/pr61684.c index f5b53b73a0d..9a7b52feb9e 100644 --- a/gcc/testsuite/gcc.c-torture/compile/pr61684.c +++ b/gcc/testsuite/gcc.c-torture/compile/pr61684.c @@ -1,4 +1,5 @@ /* PR tree-optimization/61684 */ +/* { dg-xfail-if "ptxas crashes" { nvptx-*-* } { "*" } { "-O0" "-O1" "-Os" } } */ int a, c; static int *b = 0; diff --git a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c index 85b910df31c..34d03137e26 100644 --- a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c @@ -71,6 +71,9 @@ __aeabi_idiv0 (int return_value) /* Nios II requires both hardware support and user configuration to raise an exception on divide by zero. */ # define DO_TEST 0 +#elif defined (__nvptx__) +/* There isn't even a signal function. */ +# define DO_TEST 0 #else # define DO_TEST 1 #endif diff --git a/gcc/testsuite/gcc.c-torture/execute/pr20601-1.c b/gcc/testsuite/gcc.c-torture/execute/pr20601-1.c index 7c13c913819..6eab1ef1ea7 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr20601-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr20601-1.c @@ -1,4 +1,5 @@ /* PR tree-optimization/20601 */ +/* { dg-xfail-if "ptxas crashes" { nvptx-*-* } { "-O1" } { "" } } */ extern void abort (void); extern void exit (int); diff --git a/gcc/testsuite/gcc.c-torture/execute/pr52129.c b/gcc/testsuite/gcc.c-torture/execute/pr52129.c index a60bfa8bb6a..ab43ca60cfe 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr52129.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr52129.c @@ -1,4 +1,5 @@ /* PR target/52129 */ +/* { dg-xfail-if "ptxas crashes" { nvptx-*-* } { "-O1" } { "" } } */ extern void abort (void); struct S { void *p; unsigned int q; }; diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59221.c b/gcc/testsuite/gcc.c-torture/execute/pr59221.c index 0cd425948fc..b3072271bfb 100644 --- a/gcc/testsuite/gcc.c-torture/execute/pr59221.c +++ b/gcc/testsuite/gcc.c-torture/execute/pr59221.c @@ -1,3 +1,4 @@ +/* { dg-xfail-if "ptxas crashes" { nvptx-*-* } { "*" } { "-O0" "-Os" } } */ int a = 1, b, d; diff --git a/gcc/testsuite/gcc.dg/20020310-1.c b/gcc/testsuite/gcc.dg/20020310-1.c index 7f35e9b0953..09b83225ad0 100644 --- a/gcc/testsuite/gcc.dg/20020310-1.c +++ b/gcc/testsuite/gcc.dg/20020310-1.c @@ -3,6 +3,7 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ /* { dg-options "-O2 -mtune=i586" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ +/* { dg-xfail-if "doesn't support self-referential initializers" { nvptx-*-* } } */ struct A { diff --git a/gcc/testsuite/gcc.dg/20020312-2.c b/gcc/testsuite/gcc.dg/20020312-2.c index 63fbfcc5c4b..de217412af5 100644 --- a/gcc/testsuite/gcc.dg/20020312-2.c +++ b/gcc/testsuite/gcc.dg/20020312-2.c @@ -104,6 +104,8 @@ extern void abort (void); /* No pic register. */ #elif defined(__MSP430__) /* No pic register. */ +#elif defined (__nvptx__) +/* No pic register. */ #else # error "Modify the test for your target." #endif diff --git a/gcc/testsuite/gcc.dg/20040813-1.c b/gcc/testsuite/gcc.dg/20040813-1.c index 8be831d96b6..782fccb086b 100644 --- a/gcc/testsuite/gcc.dg/20040813-1.c +++ b/gcc/testsuite/gcc.dg/20040813-1.c @@ -2,7 +2,7 @@ /* Contributed by Devang Patel */ /* { dg-do compile } */ -/* { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* nios2-*-* *-*-vxworks* } { "*" } { "" } } */ +/* { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* nios2-*-* *-*-vxworks* nvptx-*-* } { "*" } { "" } } */ /* { dg-options "-gstabs" } */ int diff --git a/gcc/testsuite/gcc.dg/const-elim-2.c b/gcc/testsuite/gcc.dg/const-elim-2.c index ce55ba1c824..a6cc1a406a8 100644 --- a/gcc/testsuite/gcc.dg/const-elim-2.c +++ b/gcc/testsuite/gcc.dg/const-elim-2.c @@ -1,7 +1,7 @@ /* The string constant in this test case should be emitted exactly once. */ /* { dg-do compile } */ /* { dg-options "-O2" } */ -/* { dg-final { scan-assembler-times "hi there" 1 } } */ +/* { dg-final { scan-assembler-times "hi there" 1 { xfail nvptx-*-* } } } */ static inline int returns_23() { return 23; } diff --git a/gcc/testsuite/gcc.dg/pr28755.c b/gcc/testsuite/gcc.dg/pr28755.c index 9cd1330d1dd..50b56fb8907 100644 --- a/gcc/testsuite/gcc.dg/pr28755.c +++ b/gcc/testsuite/gcc.dg/pr28755.c @@ -3,6 +3,7 @@ /* { dg-require-effective-target ptr32plus } */ /* { dg-options "-Os" } */ /* { dg-final { scan-assembler-times "2112543726\|7deadbee" 2 } } */ +/* { dg-skip-if "integer output is different here" { nvptx-*-* } } */ struct S { diff --git a/gcc/testsuite/gcc.dg/pr44194-1.c b/gcc/testsuite/gcc.dg/pr44194-1.c index 2b50e279fe9..e43bab5df3c 100644 --- a/gcc/testsuite/gcc.dg/pr44194-1.c +++ b/gcc/testsuite/gcc.dg/pr44194-1.c @@ -1,4 +1,4 @@ -/* { dg-do compile { target { { { { { { { i?86-*-* x86_64-*-* } && x32 } || lp64 } && { ! s390*-*-* } } && { ! hppa*64*-*-* } } && { ! alpha*-*-* } } && { { ! powerpc*-*-linux* } || powerpc_elfv2 } } } } */ +/* { dg-do compile { target { { { { { { { i?86-*-* x86_64-*-* } && x32 } || lp64 } && { ! s390*-*-* } } && { ! hppa*64*-*-* } } && { ! alpha*-*-* } } && { { ! powerpc*-*-linux* } || powerpc_elfv2 } && { ! nvptx-*-* } } } } */ /* { dg-options "-O2 -fdump-rtl-dse1 -fdump-rtl-final" } */ /* Restrict to 64-bit targets since 32-bit targets usually return small diff --git a/gcc/testsuite/gcc.dg/torture/pr36400.c b/gcc/testsuite/gcc.dg/torture/pr36400.c index 1dedc0aa1ca..fa2591e1b7c 100644 --- a/gcc/testsuite/gcc.dg/torture/pr36400.c +++ b/gcc/testsuite/gcc.dg/torture/pr36400.c @@ -14,4 +14,4 @@ void baz() barptr->some_string = "Everything OK"; } -/* { dg-final { scan-assembler "Everything OK" } } */ +/* { dg-final { scan-assembler "Everything OK" { xfail nvptx-*-* } } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index a395f5ff8c9..f2bf6390e5d 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -436,6 +436,7 @@ proc check_effective_target_trampolines { } { } if { [istarget avr-*-*] || [istarget msp430-*-*] + || [istarget nvptx-*-*] || [istarget hppa2.0w-hp-hpux11.23] || [istarget hppa64-hp-hpux11.23] } { return 0; @@ -532,6 +533,7 @@ proc check_profiling_available { test_what } { || [istarget msp430-*-*] || [istarget nds32*-*-elf] || [istarget nios2-*-elf] + || [istarget nvptx-*-*] || [istarget powerpc-*-eabi*] || [istarget powerpc-*-elf] || [istarget rx-*-*] @@ -4190,7 +4192,8 @@ proc check_effective_target_vect_natural_alignment { } { verbose "check_effective_target_vect_natural_alignment: using cached result" 2 } else { set et_vect_natural_alignment_saved 1 - if { [check_effective_target_arm_eabi] } { + if { [check_effective_target_arm_eabi] + || [istarget nvptx-*-*] } { set et_vect_natural_alignment_saved 0 } } @@ -5660,6 +5663,9 @@ proc check_effective_target_gld { } { proc check_effective_target_lto { } { global ENABLE_LTO + if { [istarget nvptx-*-*] } { + return 0; + } return [info exists ENABLE_LTO] } -- 2.30.2