From patchwork Thu Aug 20 15:55:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 509086 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 760891402AB for ; Fri, 21 Aug 2015 01:56:17 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=QfoleQwA; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; q=dns; s=default; b=eDfaGJVMQLV/G2brf HDKZ2pN+43jgbP/xTtZkhiDy23IHdFaGy5b9EFjV3HUf1/k8hJj3OHGKKw1oPsT7 xVHr98VopTqZXTUJZ/1AGpJegRHrQoTpH0PP0Rki6Jev3jUibY4lNZ6l4bWpBMGN oL79AHMkcQIwIydqYlWVBwYIhI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:cc:from:message-id:date:mime-version :in-reply-to:content-type; s=default; bh=l6XDZyxcZAyNOzsy9bQWMIZ 0w2o=; b=QfoleQwAUh87hxt/pht5idtgPu0fIRXdtb9kTJ5UqxL3NDXHQSru/8j ZhRjOdwbu3afIqFLPdNJyACK3/n6ulIEKKf5KyLQjXeLGJni4j/zLN3XdUIwfvsS bAZvThhugLEoZ4aU6V4tN6obZ6Mb9/cIG3ozdeJiWGmiaJFVyg8A= Received: (qmail 1546 invoked by alias); 20 Aug 2015 15:56:09 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 1529 invoked by uid 89); 20 Aug 2015 15:56:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=BAYES_50, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-qg0-f43.google.com Received: from mail-qg0-f43.google.com (HELO mail-qg0-f43.google.com) (209.85.192.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 20 Aug 2015 15:56:04 +0000 Received: by qgeb6 with SMTP id b6so30599434qge.3 for ; Thu, 20 Aug 2015 08:56:02 -0700 (PDT) X-Received: by 10.140.232.209 with SMTP id d200mr7371497qhc.68.1440086162345; Thu, 20 Aug 2015 08:56:02 -0700 (PDT) Received: from ?IPv6:2601:181:c000:c497:a2a8:cdff:fe3e:b48? ([2601:181:c000:c497:a2a8:cdff:fe3e:b48]) by smtp.googlemail.com with ESMTPSA id f107sm2507816qge.3.2015.08.20.08.56.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 20 Aug 2015 08:56:01 -0700 (PDT) Subject: Re: [nvptx] testsuite cleanups To: GCC Patches References: <55D4E701.3060600@acm.org> Cc: Bernd Schmidt From: Nathan Sidwell Message-ID: <55D5F88F.1020702@acm.org> Date: Thu, 20 Aug 2015 11:55:59 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <55D4E701.3060600@acm.org> On 08/19/15 16:28, Nathan Sidwell wrote: > This patch cleans up a bunch of c testsuite fails, (by skipping them) > > 1) make nvptx-*-* a freestanding environment. While there is a newlib port, > it's not a full c library, and in particular doesn't have all the IO that's > generally presumed. > > 2) added effective_target_global_constructor. nvptx lacks these, and the > environment for which it's intended doesn't really need them, > > 3) Some tests already check 'SIGNAL_SUPPRESS' to avoid signals. Added smarts in > gcc.exp to set that from the board info. > > 4) skip the dwarf tests entirely. PTX dwarf directives are somewhat funky and > it's just meaningless noise in the testsuite right now. > > 5) skip tests that cause ptxas to blow up. There's no point waiting for ptxas > to be fixed. > > 6) .. except for callind, which is fixed simply by not naming a function 'call'. > > 7) mul-subnormal-single-1 had a full 3 argument definition of main, but doesn't > need it. > > 8) added check for non frestanding to a bunch of tests that require more IO than > ptx can provide. > > 9) added check for nonlocal_goto on a bunch of tests that used setjmp (builtin > or otherwise). > > 10) added check for global constructor on a test. > > 11) added checks for profiling on some tests that check profiling. > > This isn't a full cleanup, but a first pass to remove a bunch of false > negatives. I expect further cleanups and/or fixes later. > > Any comments or objections? this version catches a few more cases and fixes a thinko about the sense of the condition in skip-if. I also tested on x86_64-linux to make sure I wasn't inadvertently skipping tests on at least one non-nvptx target. nathan 2015-08-20 Nathan Sidwell * lib/target-supports.exp (check_effective_target_freestanding): nvptx is freestanding. (check_effective_target_global_constructor): New. * lib/gcc.exp (gcc_target_compile): Set SIGNAL_SUPPRESS if needed. * gcc.dg/debug/debug.exp: Skip for nvptx. * gcc.dg/debug/dwarf2/dwarf2.exp: Likewise. * gcc.c-torture/execute/981019-1.c: Ptx assembler bug. * gcc.c-torture/compile/limits-externdecl.c: Likewise. * gcc.c-torture/compile/pr33855.c: Likewise. * gcc.c-torture/compile/920723-1.c: Likewise. * gcc.c-torture/compile/pr35468.c: Ptx assembler objects to writing a const. * gcc.c-torture/compile/mangle-1.c: Ptx assembler objects to . in label. * gcc.c-torture/compile/callind.c: Ptx assembler objects to label 'call'. * gcc.c-torture/execute/ieee/mul-subnormal-single-1.c: Make main prototype normal. * gcc.c-torture/execute/switch-1.c: Likewise. * gcc.c-torture/execute/pr34456.c: Require not freestanding * gcc.c-torture/execute/printf-1.c: Likewise. * gcc.c-torture/execute/printf-chk-1.c: Likewise. * gcc.c-torture/execute/fprintf-1.c: Likewise. * gcc.c-torture/execute/fprintf-chk-1.c: Likewise. * gcc.c-torture/execute/vprintf-1.c: Likewise. * gcc.c-torture/execute/vprintf-chk-1.c: Likewise. * gcc.c-torture/execute/vfprintf-1.c: Likewise. * gcc.c-torture/execute/vfprintf-chk-1.c: Likewise. * gcc.c-torture/execute/builtins/fputs.c: Likewise. * gcc.c-torture/execute/gofast.c: Likewise. * gcc.c-torture/execute/complex-6.c: Likewise. * gcc.c-torture/execute/builtins/memcpy-chk.x: Require nonlocal goto. * gcc.c-torture/execute/builtins/memmove-chk.x: Likewise. * gcc.c-torture/execute/builtins/mempcpy-chk.x: Likewise. * gcc.c-torture/execute/builtins/memset-chk.x: Likewise. * gcc.c-torture/execute/builtins/snprintf-chk.x: Likewise. * gcc.c-torture/execute/builtins/sprintf-chk.x: Likewise. * gcc.c-torture/execute/builtins/stpcpy-chk.x: Likewise. * gcc.c-torture/execute/builtins/stpncpy-chk.x: Likewise. * gcc.c-torture/execute/builtins/strcat-chk.x: Likewise. * gcc.c-torture/execute/builtins/strcpy-chk.x: Likewise. * gcc.c-torture/execute/builtins/strncat-chk.x: Likewise. * gcc.c-torture/execute/builtins/strncpy-chk.x: Likewise. * gcc.c-torture/execute/builtins/vsnprintf-chk.x: Likewise. * gcc.c-torture/execute/builtins/vsprintf-chk.x: Likewise. * gcc.c-torture/execute/builtins/pr23484-chk.x: Likewise. * gcc.dg/setjmp-1.c: Likewise. * gcc.dg/cleanup-5.c: Likewise. * gcc.dg/cleanup-12.c: Likewise. * gcc.dg/cleanup-13.c: Likewise. * gcc.dg/constructor-1.c: Require global ctor. * gcc.dg/fork-instrumentation.c: Require profiling. * gcc.dg/20030107-1.c: Likewise. * gcc.dg/20030702-1.c: Likewise. * gcc.dg/cpp/lexstrng.c: Avoid IO unless debugging. * gcc.dg/cpp/paste2.c: Likewise. * gcc.dg/cpp/strify3.c: Likewise. * gcc.dg/cpp/strify4.c: Likewise. * gcc.dg/cpp/lexnum.c: Likewise. * gcc.dg/cpp/digraphs.c: Likewise. * gcc.dg/cpp/macro1.c: Likewise. Index: lib/target-supports.exp =================================================================== --- lib/target-supports.exp (revision 453995) +++ lib/target-supports.exp (working copy) @@ -580,7 +580,10 @@ proc check_profiling_available { test_wh # in Section 4 of C99 standard. Effectively, it is a target which supports no # extra headers or libraries other than what is considered essential. proc check_effective_target_freestanding { } { - return 0 + if { [istarget nvptx-*-*] } { + return 1 + } + return 0 } # Return 1 if target has packed layout of structure members by @@ -641,6 +644,15 @@ proc check_effective_target_nonlocal_got if { [istarget nvptx-*-*] } { return 0 } + return 1 +} + +# Return 1 if global constructors are supported, 0 otherwise. + +proc check_effective_target_global_constructor {} { + if { [istarget nvptx-*-*] } { + return 0 + } return 1 } Index: lib/gcc.exp =================================================================== --- lib/gcc.exp (revision 453995) +++ lib/gcc.exp (working copy) @@ -150,6 +150,9 @@ proc gcc_target_compile { source dest ty 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" + } # TEST_ALWAYS_FLAGS are flags that should be passed to every # compilation. They are passed first to allow individual Index: gcc.c-torture/execute/981019-1.c =================================================================== --- gcc.c-torture/execute/981019-1.c (revision 453995) +++ gcc.c-torture/execute/981019-1.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "ptxas seg faults" { nvptx-*-* } { "-O2" "-O3*" } { "" } } */ + extern int f2(void); extern int f3(void); extern void f1(void); Index: gcc.c-torture/compile/limits-externdecl.c =================================================================== --- gcc.c-torture/compile/limits-externdecl.c (revision 453995) +++ gcc.c-torture/compile/limits-externdecl.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "ptxas runs out of memory" { nvptx-*-* } { "*" } { "" } } */ + /* { dg-require-effective-target int32plus } */ /* Inspired by the test case for PR middle-end/52640. */ Index: gcc.c-torture/compile/pr33855.c =================================================================== --- gcc.c-torture/compile/pr33855.c (revision 453995) +++ gcc.c-torture/compile/pr33855.c (working copy) @@ -1,3 +1,4 @@ +/* { dg-skip-if "ptxas seg faults" { nvptx-*-* } { "-O1" } { "" } } */ /* Testcase by Martin Michlmayr */ /* Used to segfault due to cselim not marking the complex temp var as GIMPLE reg. */ Index: gcc.c-torture/compile/920723-1.c =================================================================== --- gcc.c-torture/compile/920723-1.c (revision 453995) +++ gcc.c-torture/compile/920723-1.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "ptxas seg faults" { nvptx-*-* } { "-O2" } { "" } } */ + #if defined(STACK_SIZE) && STACK_SIZE < 65536 # define GITT_SIZE 75 #endif Index: gcc.c-torture/compile/pr35468.c =================================================================== --- gcc.c-torture/compile/pr35468.c (revision 453995) +++ gcc.c-torture/compile/pr35468.c (working copy) @@ -1,4 +1,5 @@ /* PR tree-optimization/35468 */ +/* { dg-do compile } */ void foo (void) Index: gcc.c-torture/compile/mangle-1.c =================================================================== --- gcc.c-torture/compile/mangle-1.c (revision 453995) +++ gcc.c-torture/compile/mangle-1.c (working copy) @@ -1,9 +1,17 @@ + +#if __nvptx__ +/* Doesn't like . in labels. */ +#define SEP "$" +#else +#define SEP "." +#endif + int foo(void) { static int x asm ("x") = 3; return x++; } -int X2 asm ("x.0") = 4; -int X3 asm ("_x.0") = 5; +int X2 asm ("x" SEP "0") = 4; +int X3 asm ("_x" SEP "0") = 5; Index: gcc.c-torture/compile/callind.c =================================================================== --- gcc.c-torture/compile/callind.c (revision 453995) +++ gcc.c-torture/compile/callind.c (working copy) @@ -1,8 +1,8 @@ -call (foo, a) +bar (foo, a) int (**foo) (); { - (foo)[1] = call; + (foo)[1] = bar; foo[a] (1); } Index: gcc.c-torture/execute/ieee/mul-subnormal-single-1.c =================================================================== --- gcc.c-torture/execute/ieee/mul-subnormal-single-1.c (revision 453995) +++ gcc.c-torture/execute/ieee/mul-subnormal-single-1.c (working copy) @@ -57,7 +57,7 @@ struct }; int -main (int argc, char *argv[], char *envp[]) +main () { unsigned int i; Index: gcc.c-torture/execute/pr34456.c =================================================================== --- gcc.c-torture/execute/pr34456.c (revision 453995) +++ gcc.c-torture/execute/pr34456.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "requires qsort" { freestanding } { "*" } { "" } } */ + #include int __attribute__ ((noinline)) debug (void) { return 1; } Index: gcc.c-torture/execute/vprintf-chk-1.c =================================================================== --- gcc.c-torture/execute/vprintf-chk-1.c (revision 453995) +++ gcc.c-torture/execute/vprintf-chk-1.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } } */ + #ifndef test #include #include Index: gcc.c-torture/execute/vfprintf-1.c =================================================================== --- gcc.c-torture/execute/vfprintf-1.c (revision 453995) +++ gcc.c-torture/execute/vfprintf-1.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } } */ + #ifndef test #include #include Index: gcc.c-torture/execute/gofast.c =================================================================== --- gcc.c-torture/execute/gofast.c (revision 453995) +++ gcc.c-torture/execute/gofast.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } } */ + /* Program to test gcc's usage of the gofast library. */ /* The main guiding themes are to make it trivial to add test cases over time Index: gcc.c-torture/execute/fprintf-1.c =================================================================== --- gcc.c-torture/execute/fprintf-1.c (revision 453995) +++ gcc.c-torture/execute/fprintf-1.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } } */ + #include #include Index: gcc.c-torture/execute/fprintf-chk-1.c =================================================================== --- gcc.c-torture/execute/fprintf-chk-1.c (revision 453995) +++ gcc.c-torture/execute/fprintf-chk-1.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } } */ + #include #include #include Index: gcc.c-torture/execute/printf-1.c =================================================================== --- gcc.c-torture/execute/printf-1.c (revision 453995) +++ gcc.c-torture/execute/printf-1.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } } */ + #include #include Index: gcc.c-torture/execute/vfprintf-chk-1.c =================================================================== --- gcc.c-torture/execute/vfprintf-chk-1.c (revision 453995) +++ gcc.c-torture/execute/vfprintf-chk-1.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } } */ + #ifndef test #include #include Index: gcc.c-torture/execute/complex-6.c =================================================================== --- gcc.c-torture/execute/complex-6.c (revision 453995) +++ gcc.c-torture/execute/complex-6.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } } */ + /* This test tests complex conjugate and passing/returning of complex parameter. */ Index: gcc.c-torture/execute/switch-1.c =================================================================== --- gcc.c-torture/execute/switch-1.c (revision 453995) +++ gcc.c-torture/execute/switch-1.c (working copy) @@ -22,7 +22,7 @@ foo (int x) } int -main (int argc) +main () { int i, r; Index: gcc.c-torture/execute/vprintf-1.c =================================================================== --- gcc.c-torture/execute/vprintf-1.c (revision 453995) +++ gcc.c-torture/execute/vprintf-1.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } } */ + #ifndef test #include #include Index: gcc.c-torture/execute/printf-chk-1.c =================================================================== --- gcc.c-torture/execute/printf-chk-1.c (revision 453995) +++ gcc.c-torture/execute/printf-chk-1.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } } */ + #include #include #include Index: gcc.c-torture/execute/builtins/strcpy-chk.x =================================================================== --- gcc.c-torture/execute/builtins/strcpy-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/strcpy-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test4 struct A on epiphany would require Index: gcc.c-torture/execute/builtins/strcat-chk.x =================================================================== --- gcc.c-torture/execute/builtins/strcat-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/strcat-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test3 struct A on epiphany would require Index: gcc.c-torture/execute/builtins/mempcpy-chk.x =================================================================== --- gcc.c-torture/execute/builtins/mempcpy-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/mempcpy-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test4 struct A on epiphany would require Index: gcc.c-torture/execute/builtins/vsprintf-chk.x =================================================================== --- gcc.c-torture/execute/builtins/vsprintf-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/vsprintf-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test3_sub struct A on epiphany would require Index: gcc.c-torture/execute/builtins/vsnprintf-chk.x =================================================================== --- gcc.c-torture/execute/builtins/vsnprintf-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/vsnprintf-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test3_sub struct A on epiphany would require Index: gcc.c-torture/execute/builtins/snprintf-chk.x =================================================================== --- gcc.c-torture/execute/builtins/snprintf-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/snprintf-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test3 struct A on epiphany would require Index: gcc.c-torture/execute/builtins/stpcpy-chk.x =================================================================== --- gcc.c-torture/execute/builtins/stpcpy-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/stpcpy-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test4 struct A on epiphany would require Index: gcc.c-torture/execute/builtins/memcpy-chk.x =================================================================== --- gcc.c-torture/execute/builtins/memcpy-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/memcpy-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test4 struct A on epiphany would require Index: gcc.c-torture/execute/builtins/stpncpy-chk.x =================================================================== --- gcc.c-torture/execute/builtins/stpncpy-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/stpncpy-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test4 struct A on epiphany would require Index: gcc.c-torture/execute/builtins/strncpy-chk.x =================================================================== --- gcc.c-torture/execute/builtins/strncpy-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/strncpy-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test4 struct A on epiphany would require Index: gcc.c-torture/execute/builtins/fputs.c =================================================================== --- gcc.c-torture/execute/builtins/fputs.c (revision 453995) +++ gcc.c-torture/execute/builtins/fputs.c (working copy) @@ -1,3 +1,5 @@ +/* { dg-skip-if "requires io" { freestanding } { "*" } { "" } } */ + /* Copyright (C) 2000, 2001 Free Software Foundation. Ensure all expected transformations of builtin fputs occur and that Index: gcc.c-torture/execute/builtins/strncat-chk.x =================================================================== --- gcc.c-torture/execute/builtins/strncat-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/strncat-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test3 struct A on epiphany would require Index: gcc.c-torture/execute/builtins/sprintf-chk.x =================================================================== --- gcc.c-torture/execute/builtins/sprintf-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/sprintf-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test3 struct A on epiphany would require Index: gcc.c-torture/execute/builtins/memset-chk.x =================================================================== --- gcc.c-torture/execute/builtins/memset-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/memset-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test3 struct A on epiphany would require Index: gcc.c-torture/execute/builtins/memmove-chk.x =================================================================== --- gcc.c-torture/execute/builtins/memmove-chk.x (revision 453995) +++ gcc.c-torture/execute/builtins/memmove-chk.x (working copy) @@ -1,3 +1,9 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + if [istarget "epiphany-*-*"] { # This test assumes the absence of struct padding. # to make this true for test5 struct A on epiphany would require Index: gcc.dg/fork-instrumentation.c =================================================================== --- gcc.dg/fork-instrumentation.c (revision 453995) +++ gcc.dg/fork-instrumentation.c (working copy) @@ -1,5 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O0 -fprofile-generate" } */ +/* { dg-require-profiling "-fprofile-generate" } */ + int fork(void); int t() Index: gcc.dg/constructor-1.c =================================================================== --- gcc.dg/constructor-1.c (revision 453995) +++ gcc.dg/constructor-1.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O2" } */ +/* { dg-skip-if "" { ! global_constructor } { "*" } { "" } } */ /* The ipa-split pass pulls the body of the if(!x) block into a separate function to make foo a better inlining Index: gcc.dg/setjmp-1.c =================================================================== --- gcc.dg/setjmp-1.c (revision 453995) +++ gcc.dg/setjmp-1.c (working copy) @@ -3,6 +3,7 @@ /* { dg-do compile } */ /* { dg-options "-O -Wclobbered -Wextra -Wall" } */ +/* { dg-skip-if "" { ! nonlocal_goto } { "*" } { "" } } */ #include Index: gcc.dg/cleanup-12.c =================================================================== --- gcc.dg/cleanup-12.c (revision 453995) +++ gcc.dg/cleanup-12.c (working copy) @@ -3,6 +3,7 @@ /* { dg-do run } */ /* { dg-options "-O2 -fexceptions" } */ /* { dg-skip-if "" { "ia64-*-hpux11.*" } { "*" } { "" } } */ +/* { dg-skip-if "" { ! nonlocal_goto } { "*" } { "" } } */ /* Verify unwind info in presence of alloca. */ #include Index: gcc.dg/20030107-1.c =================================================================== --- gcc.dg/20030107-1.c (revision 453995) +++ gcc.dg/20030107-1.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fprofile-arcs" } */ +/* { dg-require-profiling "-fprofile-generate" } */ extern void bar(void) __attribute__((noreturn)); int foo (void) { bar(); } Index: gcc.dg/20030702-1.c =================================================================== --- gcc.dg/20030702-1.c (revision 453995) +++ gcc.dg/20030702-1.c (working copy) @@ -3,6 +3,7 @@ /* { dg-do compile { target fpic } } */ /* { dg-options "-O2 -fpic -fprofile-arcs" } */ /* { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } */ +/* { dg-require-profiling "-fprofile-generate" } */ int fork (void); Index: gcc.dg/debug/debug.exp =================================================================== --- gcc.dg/debug/debug.exp (revision 453995) +++ gcc.dg/debug/debug.exp (working copy) @@ -19,6 +19,11 @@ # Load support procs. load_lib gcc-dg.exp +# Disable on ptx +if { [istarget nvptx-*-*] } { + return +} + # Initialize `dg'. dg-init Index: gcc.dg/debug/dwarf2/dwarf2.exp =================================================================== --- gcc.dg/debug/dwarf2/dwarf2.exp (revision 453995) +++ gcc.dg/debug/dwarf2/dwarf2.exp (working copy) @@ -19,6 +19,11 @@ # Load support procs. load_lib gcc-dg.exp +# Disable on ptx +if { [istarget nvptx-*-*] } { + return +} + # If a testcase doesn't have special options, use these. global DEFAULT_CFLAGS if ![info exists DEFAULT_CFLAGS] then { Index: gcc.dg/cpp/lexstrng.c =================================================================== --- gcc.dg/cpp/lexstrng.c (revision 453995) +++ gcc.dg/cpp/lexstrng.c (working copy) @@ -11,7 +11,11 @@ typedef __WCHAR_TYPE__ wchar_t; extern int strcmp (const char *, const char *); +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif extern void abort (void); #define err(str) do { puts(str); abort(); } while (0) Index: gcc.dg/cpp/paste2.c =================================================================== --- gcc.dg/cpp/paste2.c (revision 453995) +++ gcc.dg/cpp/paste2.c (working copy) @@ -12,7 +12,11 @@ typedef __WCHAR_TYPE__ wchar_t; extern int strcmp (const char *, const char *); +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif extern void abort (void); #define err(str) do { puts(str); abort(); } while (0) Index: gcc.dg/cpp/strify3.c =================================================================== --- gcc.dg/cpp/strify3.c (revision 453995) +++ gcc.dg/cpp/strify3.c (working copy) @@ -9,7 +9,11 @@ Neil Booth, 24 Sep 2001. */ extern int strcmp (const char *, const char *); +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif extern void abort (void); #define err(str) do { puts(str); abort(); } while (0) Index: gcc.dg/cpp/strify4.c =================================================================== --- gcc.dg/cpp/strify4.c (revision 453995) +++ gcc.dg/cpp/strify4.c (working copy) @@ -4,7 +4,11 @@ Andrew Pinski */ extern int strcmp (const char *, const char *); +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif extern void abort (void); #define err(str) do { puts(str); abort(); } while (0) Index: gcc.dg/cpp/lexnum.c =================================================================== --- gcc.dg/cpp/lexnum.c (revision 453995) +++ gcc.dg/cpp/lexnum.c (working copy) @@ -5,7 +5,11 @@ /* Test lexing of numbers. */ +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif extern void abort (void); #define err(str) do { puts(str); abort(); } while (0) Index: gcc.dg/cpp/digraphs.c =================================================================== --- gcc.dg/cpp/digraphs.c (revision 453995) +++ gcc.dg/cpp/digraphs.c (working copy) @@ -8,7 +8,11 @@ extern int strcmp (const char *, const char *); extern void abort (void); +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif #define err(str) do { puts(str); abort(); } while (0) %:define glue(x, y) x %:%: y /* #define glue(x, y) x ## y. */ Index: gcc.dg/cpp/macro1.c =================================================================== --- gcc.dg/cpp/macro1.c (revision 453995) +++ gcc.dg/cpp/macro1.c (working copy) @@ -4,7 +4,11 @@ /* Tests various macro abuse is correctly expanded. */ +#if DEBUG extern int puts (const char *); +#else +#define puts(X) +#endif extern void abort (void); extern int strcmp(const char *s1, const char *s2); Index: gcc.dg/cleanup-13.c =================================================================== --- gcc.dg/cleanup-13.c (revision 453995) +++ gcc.dg/cleanup-13.c (working copy) @@ -2,6 +2,7 @@ /* { dg-do run } */ /* { dg-options "-fexceptions" } */ /* { dg-skip-if "" { "ia64-*-hpux11.*" } { "*" } { "" } } */ +/* { dg-skip-if "" { ! nonlocal_goto } { "*" } { "" } } */ /* Verify DW_OP_* handling in the unwinder. */ #include Index: gcc.dg/cleanup-5.c =================================================================== --- gcc.dg/cleanup-5.c (revision 453995) +++ gcc.dg/cleanup-5.c (working copy) @@ -2,6 +2,7 @@ /* { dg-do run } */ /* { dg-options "-fexceptions" } */ /* { dg-skip-if "" { "ia64-*-hpux11.*" } { "*" } { "" } } */ +/* { dg-skip-if "" { ! nonlocal_goto } { "*" } { "" } } */ /* Verify that cleanups work with exception handling. */ #include Index: gcc.c-torture/execute/builtins/pr23484-chk.x =================================================================== --- gcc.c-torture/execute/builtins/pr23484-chk.x (revision 0) +++ gcc.c-torture/execute/builtins/pr23484-chk.x (revision 0) @@ -0,0 +1,7 @@ +load_lib target-supports.exp + +if { ! [check_effective_target_nonlocal_goto] } { + return 1 +} + +return 0