From patchwork Tue Oct 21 14:29:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 401546 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 8790414007B for ; Wed, 22 Oct 2014 01:44:58 +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=ez8418TWo+JgHRnz7 HMzAJKAG8ky/BKEF0ekXTmC+s/KslP5CBp9yziHkD/1X+3yPa9SwokRX1wX8DFN8 QBrGJ4SjKm5m+9rdLv2ImG7tKBeHt1FMDX9Rk8XAJ7YausJ9WW+U3m5bXqQD7mnr zEhOAJqCv+sMoVzllFU8Q5SPTc= 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=VZJY9i7lTWU9F6QNYwqyYuu D1uo=; b=aRagBENhFsMrrtxJEOxeosbCsEiLbpF8vKSKgCPvF/03Iv6TZGgsjTo hOeDmUPeY2wHFgwtEZ/9BU2z2wtwjjfH8dEznYF04pKp5mGBBSFUsi4TnVELa0RQ osAQpJ9umS81ydzXsoPQ38+2F1agNGiGjHTJyn1zFTGaZSgP5G0Y= Received: (qmail 5276 invoked by alias); 21 Oct 2014 14:30:43 -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 5229 invoked by uid 89); 21 Oct 2014 14:30:42 -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:30:32 +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 1XgaSC-0004WN-7K from Bernd_Schmidt@mentor.com for gcc-patches@gcc.gnu.org; Tue, 21 Oct 2014 07:30:28 -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:30:26 +0100 Message-ID: <54466DB9.8010102@codesourcery.com> Date: Tue, 21 Oct 2014 16:29:13 +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: [7/7] nvptx testsuite patches: Return addresses References: <5446694A.1010705@codesourcery.com> In-Reply-To: <5446694A.1010705@codesourcery.com> This tests for availability of return addresses in a number of tests. Bernd gcc/testsuite/ * lib/target-supports.exp (check_effective_target_return_address): New function. * gcc.c-torture/execute/20010122-1.c: Require return_address. * gcc.c-torture/execute/20030323-1.c: Likewise. * gcc.c-torture/execute/20030811-1.c: Likewise. * gcc.c-torture/execute/eeprof-1.c: Likewise. * gcc.c-torture/execute/frame-address.c: Likewise. * gcc.c-torture/execute/pr17377.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,17 @@ proc add_options_for_tls { flags } { return 1 } +# Return 1 if builtin_return_address and builtin_frame_address are +# supported, 0 otherwise. + +proc check_effective_target_return_address {} { + if { [istarget nvptx-*-*] } { + return 0 + } + return 1 +} + # 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/20010122-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20010122-1.c.orig +++ gcc/testsuite/gcc.c-torture/execute/20010122-1.c @@ -1,4 +1,5 @@ /* { dg-skip-if "requires frame pointers" { *-*-* } "-fomit-frame-pointer" "" } */ +/* { dg-require-effective-target return_address } */ extern void exit (int); extern void abort (void); Index: gcc/testsuite/gcc.c-torture/execute/20030323-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20030323-1.c.orig +++ gcc/testsuite/gcc.c-torture/execute/20030323-1.c @@ -1,4 +1,5 @@ /* PR opt/10116 */ +/* { dg-require-effective-target return_address } */ /* Removed tablejump while label still in use; this is really a link test. */ void *NSReturnAddress(int offset) Index: gcc/testsuite/gcc.c-torture/execute/20030811-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20030811-1.c.orig +++ gcc/testsuite/gcc.c-torture/execute/20030811-1.c @@ -1,4 +1,5 @@ /* Origin: PR target/11535 from H. J. Lu */ +/* { dg-require-effective-target return_address } */ void vararg (int i, ...) { Index: gcc/testsuite/gcc.c-torture/execute/eeprof-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/eeprof-1.c.orig +++ gcc/testsuite/gcc.c-torture/execute/eeprof-1.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target return_address } */ /* { dg-options "-finstrument-functions" } */ /* { dg-xfail-if "" { powerpc-ibm-aix* } "*" "" } */ Index: gcc/testsuite/gcc.c-torture/execute/frame-address.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/frame-address.c.orig +++ gcc/testsuite/gcc.c-torture/execute/frame-address.c @@ -1,3 +1,4 @@ +/* { dg-require-effective-target return_address } */ int check_fa_work (const char *, const char *) __attribute__((noinline)); int check_fa_mid (const char *) __attribute__((noinline)); int check_fa (char *) __attribute__((noinline)); Index: gcc/testsuite/gcc.c-torture/execute/pr17377.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/pr17377.c.orig +++ gcc/testsuite/gcc.c-torture/execute/pr17377.c @@ -1,6 +1,7 @@ /* PR target/17377 Bug in code emitted by "return" pattern on CRIS: missing pop of forced return address on stack. */ +/* { dg-require-effective-target return_address } */ int calls = 0; void *f (int) __attribute__ ((__noinline__));