From patchwork Tue Oct 21 14:23:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 401544 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 EF5D714001A for ; Wed, 22 Oct 2014 01:40:17 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; q=dns; s=default; b=un3i6w0FVo63O2/am X5vbKasInoiuRnamP5Wb0xyGal1kconj39jPnJfDOImAsdwP0n4ZGY/fCwfr+kYw 6mKI/6VdK6zzSOAHL3b/5WwW2awQyX4J7OlqlAvScZvnmdBVLBrv3S6CV3KhIh/v fXfp3AVRYYe5mtjpaznQrKusQQ= 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 :message-id:date:from:mime-version:to:subject:references :in-reply-to:content-type; s=default; bh=yHrkRiHiBcl0tAF6aKEmtzh guMc=; b=DwaXaMoWAXhSoaG22Eu70VL1id0bhYB2VJSDc1uAd+HMbVCZH4So+8q doiL80puqh+/QmzddhS1kqidcfY9uU3h9Z499GjTZjuAGqjswroMeQeN44g2vt48 i6/czAM/JxfKwoeiZMc2/xM2AXm677sBkFUVh2e0DfEtUoFrZ+uY= Received: (qmail 27910 invoked by alias); 21 Oct 2014 14:24:25 -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 27898 invoked by uid 89); 21 Oct 2014 14:24:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 21 Oct 2014 14:24:21 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1XgaMD-0003m5-HS from Bernd_Schmidt@mentor.com for gcc-patches@gcc.gnu.org; Tue, 21 Oct 2014 07:24:18 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.181.6; Tue, 21 Oct 2014 15:24:15 +0100 Message-ID: <54466C46.1000005@codesourcery.com> Date: Tue, 21 Oct 2014 16:23:02 +0200 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.8.0 MIME-Version: 1.0 To: GCC Patches Subject: [5/6] nvptx testsuite patches: jumps and labels References: <5446694A.1010705@codesourcery.com> In-Reply-To: <5446694A.1010705@codesourcery.com> This deals with tests requiring indirect jumps (including tests using setjmp), label values, and nonlocal goto. A subset of these tests uses the NO_LABEL_VALUES macro, but it's not consistent across the testsuite. The feature test I wrote tests whether that is defined and returns false for label_values if so. Bernd gcc/testsuite/ * 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. ------------------------------------------------------------------------ Index: gcc/testsuite/lib/target-supports.exp =================================================================== --- gcc/testsuite/lib/target-supports.exp.orig +++ gcc/testsuite/lib/target-supports.exp @@ -604,7 +606,38 @@ proc add_options_for_tls { flags } { return 1 } +# 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. Index: gcc/testsuite/gcc.c-torture/execute/20071220-2.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20071220-2.c.orig +++ 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); Index: gcc/testsuite/gcc.c-torture/compile/pr46107.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr46107.c.orig +++ 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)); Index: gcc/testsuite/gcc.c-torture/compile/920415-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/920415-1.c.orig +++ 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 Index: gcc/testsuite/gcc.c-torture/compile/pr32919.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr32919.c.orig +++ 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 }; Index: gcc/testsuite/gcc.c-torture/compile/pr17913.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr17913.c.orig +++ 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; Index: gcc/testsuite/gcc.c-torture/compile/pr30984.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr30984.c.orig +++ 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; Index: gcc/testsuite/gcc.c-torture/compile/pr51495.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr51495.c.orig +++ 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); Index: gcc/testsuite/gcc.c-torture/compile/991213-3.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/991213-3.c.orig +++ gcc/testsuite/gcc.c-torture/compile/991213-3.c @@ -1,2 +1,4 @@ +/* { dg-require-effective-target indirect_jumps } */ + int jump () { goto * (int (*) ()) 0xbabebec0; } Index: gcc/testsuite/gcc.c-torture/compile/20040614-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/20040614-1.c.orig +++ 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 Index: gcc/testsuite/gcc.c-torture/compile/pr25224.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr25224.c.orig +++ 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 *); Index: gcc/testsuite/gcc.c-torture/compile/920831-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/920831-1.c.orig +++ gcc/testsuite/gcc.c-torture/compile/920831-1.c @@ -1,1 +1,3 @@ +/* { dg-require-effective-target indirect_jumps } */ + f(x){goto*(char)x;} Index: gcc/testsuite/gcc.c-torture/compile/labels-3.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/labels-3.c.orig +++ 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) { Index: gcc/testsuite/gcc.c-torture/compile/920502-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/920502-1.c.orig +++ gcc/testsuite/gcc.c-torture/compile/920502-1.c @@ -1,1 +1,3 @@ +/* { dg-require-effective-target indirect_jumps } */ + extern void*t[];x(i){goto*t[i];} Index: gcc/testsuite/gcc.c-torture/compile/920428-3.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/920428-3.c.orig +++ 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 Index: gcc/testsuite/gcc.c-torture/compile/950613-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/950613-1.c.orig +++ 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 Index: gcc/testsuite/gcc.c-torture/compile/pr27863.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr27863.c.orig +++ 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) { Index: gcc/testsuite/gcc.c-torture/compile/920501-7.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/920501-7.c.orig +++ 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 Index: gcc/testsuite/gcc.c-torture/compile/920826-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/920826-1.c.orig +++ gcc/testsuite/gcc.c-torture/compile/920826-1.c @@ -1,1 +1,3 @@ +/* { dg-require-effective-target indirect_jumps } */ + f(int*x){goto*(char)*x;} Index: gcc/testsuite/gcc.c-torture/compile/20050510-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/20050510-1.c.orig +++ 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; Index: gcc/testsuite/gcc.c-torture/compile/pr28489.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr28489.c.orig +++ 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 { Index: gcc/testsuite/gcc.c-torture/compile/pr29128.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr29128.c.orig +++ 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) { Index: gcc/testsuite/gcc.c-torture/compile/pr21356.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr21356.c.orig +++ 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; Index: gcc/testsuite/gcc.c-torture/compile/labels-2.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/labels-2.c.orig +++ 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 () { Index: gcc/testsuite/gcc.c-torture/compile/20011029-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/20011029-1.c.orig +++ 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 Index: gcc/testsuite/gcc.c-torture/compile/complex-6.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/complex-6.c.orig +++ 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]; Index: gcc/testsuite/gcc.c-torture/compile/pr21728.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr21728.c.orig +++ gcc/testsuite/gcc.c-torture/compile/pr21728.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target indirect_jumps } */ + int main (void) { __label__ l1; Index: gcc/testsuite/gcc.c-torture/compile/20000518-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/20000518-1.c.orig +++ 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() Index: gcc/testsuite/gcc.c-torture/compile/20021108-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/20021108-1.c.orig +++ gcc/testsuite/gcc.c-torture/compile/20021108-1.c @@ -1,3 +1,5 @@ +/* { dg-require-effective-target label_values } */ + int main() { Index: gcc/testsuite/gcc.c-torture/compile/981006-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/981006-1.c.orig +++ 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) { Index: gcc/testsuite/gcc.c-torture/compile/pr42559.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr42559.c.orig +++ 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; Index: gcc/testsuite/gcc.c-torture/compile/pr58164.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/pr58164.c.orig +++ 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) Index: gcc/testsuite/gcc.c-torture/execute/20041214-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20041214-1.c.orig +++ 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 *); Index: gcc/testsuite/gcc.c-torture/execute/20071210-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20071210-1.c.orig +++ 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); Index: gcc/testsuite/gcc.c-torture/execute/20071220-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20071220-1.c.orig +++ 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); Index: gcc/testsuite/gcc.c-torture/execute/980526-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/980526-1.c.orig +++ 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){ Index: gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c.orig +++ gcc/testsuite/gcc.c-torture/execute/built-in-setjmp.c @@ -1,5 +1,6 @@ +/* { dg-require-effective-target indirect_jumps } */ /* { dg-require-effective-target alloca } */ extern int strcmp(const char *, const char *); extern char *strcpy(char *, const char *); extern void abort(void); Index: gcc/testsuite/gcc.c-torture/execute/pr51447.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/pr51447.c.orig +++ 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); Index: gcc/testsuite/gcc.c-torture/execute/pr56982.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/pr56982.c.orig +++ gcc/testsuite/gcc.c-torture/execute/pr56982.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target indirect_jumps } */ #include extern void abort (void); Index: gcc/testsuite/gcc.c-torture/execute/pr60003.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/pr60003.c.orig +++ 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); Index: gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-1.c =================================================================== --- gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-1.c.orig +++ 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); Index: gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-2.c =================================================================== --- gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-2.c.orig +++ 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); Index: gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-3.c =================================================================== --- gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-3.c.orig +++ 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); Index: gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-4.c =================================================================== --- gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-4.c.orig +++ 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); Index: gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c =================================================================== --- gcc/testsuite/gcc.dg/torture/stackalign/non-local-goto-5.c.orig +++ 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) Index: gcc/testsuite/gcc.dg/torture/stackalign/setjmp-1.c =================================================================== --- gcc/testsuite/gcc.dg/torture/stackalign/setjmp-1.c.orig +++ 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 *); Index: gcc/testsuite/gcc.dg/torture/stackalign/setjmp-3.c =================================================================== --- gcc/testsuite/gcc.dg/torture/stackalign/setjmp-3.c.orig +++ gcc/testsuite/gcc.dg/torture/stackalign/setjmp-3.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-require-effective-target indirect_jumps } */ #include Index: gcc/testsuite/gcc.dg/torture/stackalign/setjmp-4.c =================================================================== --- gcc/testsuite/gcc.dg/torture/stackalign/setjmp-4.c.orig +++ gcc/testsuite/gcc.dg/torture/stackalign/setjmp-4.c @@ -1,4 +1,5 @@ /* { dg-do run } */ +/* { dg-require-effective-target indirect_jumps } */ #include Index: gcc/testsuite/gcc.c-torture/execute/20040302-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20040302-1.c.orig +++ 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) { Index: gcc/testsuite/gcc.dg/comp-goto-1.c =================================================================== --- gcc/testsuite/gcc.dg/comp-goto-1.c.orig +++ 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) Index: gcc/testsuite/gcc.dg/comp-goto-2.c =================================================================== --- gcc/testsuite/gcc.dg/comp-goto-2.c.orig +++ 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) Index: gcc/testsuite/gcc.dg/pr26983.c =================================================================== --- gcc/testsuite/gcc.dg/pr26983.c.orig +++ 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. */ Index: gcc/testsuite/gcc.dg/20021029-1.c =================================================================== --- gcc/testsuite/gcc.dg/20021029-1.c.orig +++ 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) { Index: gcc/testsuite/gcc.dg/non-local-goto-1.c =================================================================== --- gcc/testsuite/gcc.dg/non-local-goto-1.c.orig +++ 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); Index: gcc/testsuite/gcc.dg/non-local-goto-2.c =================================================================== --- gcc/testsuite/gcc.dg/non-local-goto-2.c.orig +++ 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); Index: gcc/testsuite/gcc.dg/pr43379.c =================================================================== --- gcc/testsuite/gcc.dg/pr43379.c.orig +++ 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) { Index: gcc/testsuite/gcc.dg/pr45259.c =================================================================== --- gcc/testsuite/gcc.dg/pr45259.c.orig +++ 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; }; Index: gcc/testsuite/gcc.dg/pr49994-1.c =================================================================== --- gcc/testsuite/gcc.dg/pr49994-1.c.orig +++ 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) { Index: gcc/testsuite/gcc.dg/pr52139.c =================================================================== --- gcc/testsuite/gcc.dg/pr52139.c.orig +++ 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; Index: gcc/testsuite/gcc.dg/pr57287-2.c =================================================================== --- gcc/testsuite/gcc.dg/pr57287-2.c.orig +++ 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 Index: gcc/testsuite/gcc.dg/pr57287.c =================================================================== --- gcc/testsuite/gcc.dg/pr57287.c.orig +++ gcc/testsuite/gcc.dg/pr57287.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -Wall" } */ +/* { dg-require-effective-target indirect_jumps } */ #include Index: gcc/testsuite/gcc.dg/pr59920-1.c =================================================================== --- gcc/testsuite/gcc.dg/pr59920-1.c.orig +++ 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 Index: gcc/testsuite/gcc.dg/pr59920-2.c =================================================================== --- gcc/testsuite/gcc.dg/pr59920-2.c.orig +++ 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 **); Index: gcc/testsuite/gcc.dg/pr59920-3.c =================================================================== --- gcc/testsuite/gcc.dg/pr59920-3.c.orig +++ 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 **); Index: gcc/testsuite/gcc.dg/setjmp-3.c =================================================================== --- gcc/testsuite/gcc.dg/setjmp-3.c.orig +++ gcc/testsuite/gcc.dg/setjmp-3.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O" } */ +/* { dg-require-effective-target indirect_jumps } */ #include Index: gcc/testsuite/gcc.dg/setjmp-4.c =================================================================== --- gcc/testsuite/gcc.dg/setjmp-4.c.orig +++ gcc/testsuite/gcc.dg/setjmp-4.c @@ -1,5 +1,6 @@ /* { dg-do run } */ /* { dg-options "-O" } */ +/* { dg-require-effective-target indirect_jumps } */ #include Index: gcc/testsuite/gcc.dg/setjmp-5.c =================================================================== --- gcc/testsuite/gcc.dg/setjmp-5.c.orig +++ 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 Index: gcc/testsuite/gcc.dg/torture/pr33848.c =================================================================== --- gcc/testsuite/gcc.dg/torture/pr33848.c.orig +++ 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 Index: gcc/testsuite/gcc.dg/torture/pr48542.c =================================================================== --- gcc/testsuite/gcc.dg/torture/pr48542.c.orig +++ 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 Index: gcc/testsuite/gcc.dg/torture/pr53695.c =================================================================== --- gcc/testsuite/gcc.dg/torture/pr53695.c.orig +++ 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) Index: gcc/testsuite/gcc.dg/torture/pr57036-2.c =================================================================== --- gcc/testsuite/gcc.dg/torture/pr57036-2.c.orig +++ gcc/testsuite/gcc.dg/torture/pr57036-2.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target nonlocal_goto } */ int j_; int jpgDecode_convert (unsigned i) Index: gcc/testsuite/gcc.dg/torture/pr57147-2.c =================================================================== --- gcc/testsuite/gcc.dg/torture/pr57147-2.c.orig +++ 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]; Index: gcc/testsuite/gcc.dg/torture/pr57584.c =================================================================== --- gcc/testsuite/gcc.dg/torture/pr57584.c.orig +++ 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; Index: gcc/testsuite/gcc.dg/torture/pr59993.c =================================================================== --- gcc/testsuite/gcc.dg/torture/pr59993.c.orig +++ gcc/testsuite/gcc.dg/torture/pr59993.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target indirect_jumps } */ #include