From patchwork Tue Oct 21 14:26:10 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 401545 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 B5F3A14008C for ; Wed, 22 Oct 2014 01:43:23 +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=OUPpJWrMWa4ksd1MV XGrzOp7gk+82tD0gwu9Mi/pqqdg4MMfNdlD5xysnUU+ah286zdfxgMptrodftHgd aBIxI6DTVZrghuv8Zn/R1aHHiLLHCHWHQHJYO8DLFX4gO7fNFByrRdaPY8P50M5O iNEH9DFcZS3TijGyzMxr4oomHI= 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=mNIhzaY5HC9ftKbFQ172lfs BnKA=; b=T4RXb5SJVOpBBkKFcvuKrgJHIbcQk18UgT1QnBOf9YTh8IlxKmWVXkK 2tXVdeRQOUmFIL2zUWNO3zO2jIdklKSJiQ7ZZz+BzLmb3aKxUnSJkz0oM16ybgGb OOySViC4b6zZIqF9HhqPCqZ7mHm2oilGjn/C3MLzu6orw/H2EWCE= Received: (qmail 31500 invoked by alias); 21 Oct 2014 14:27:30 -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 31486 invoked by uid 89); 21 Oct 2014 14:27:29 -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:27:28 +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 1XgaPF-00048h-Ed from Bernd_Schmidt@mentor.com for gcc-patches@gcc.gnu.org; Tue, 21 Oct 2014 07:27:25 -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:27:24 +0100 Message-ID: <54466D02.6020707@codesourcery.com> Date: Tue, 21 Oct 2014 16:26:10 +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: [6/7] Random tweaks References: <5446694A.1010705@codesourcery.com> In-Reply-To: <5446694A.1010705@codesourcery.com> This tweaks a few tests so that we don't have to skip them. This is mostly concerned with declaring main properly, or changing other declarations where the test does not seem to rely on the type mismatches. I've also included one example of changing a function name to not be "call", ptxas seems to have a bug that makes it not allow this function name. If that doesn't seem too awful I'll have a few more tests to fix up in this way. There'll be a 7th patch, not because I can't count, but because I didn't follow a consistent naming scheme for the patches. Bernd * gcc.c-torture/compile/920625-2.c: Add return type to freeReturnStruct. * gcc.c-torture/execute/20091229-1.c: Declare main properly. * gcc.c-torture/execute/pr61375.c: Likewise. * gcc.c-torture/execute/20111208-1.c: Use __SIZE_TYPE__ for size_t. * gcc.dg/pr30904.c: Remove extern from declaration of t. * gcc.c-torture/compile/callind.c (bar): Renamed from call. Index: gcc/testsuite/gcc.c-torture/compile/920625-2.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/920625-2.c.orig +++ gcc/testsuite/gcc.c-torture/compile/920625-2.c @@ -100,4 +100,4 @@ copyQueryResult(Widget w, Boolean copy, freeReturnStruct(); } -freeReturnStruct(){} +void freeReturnStruct(){} Index: gcc/testsuite/gcc.c-torture/execute/20091229-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20091229-1.c.orig +++ gcc/testsuite/gcc.c-torture/execute/20091229-1.c @@ -1,2 +1,2 @@ long long foo(long long v) { return v / -0x080000000LL; } -void main() { if (foo(0x080000000LL) != -1) abort(); exit (0); } +int main(int argc, char **argv) { if (foo(0x080000000LL) != -1) abort(); exit (0); } Index: gcc/testsuite/gcc.c-torture/execute/20111208-1.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/20111208-1.c.orig +++ gcc/testsuite/gcc.c-torture/execute/20111208-1.c @@ -1,7 +1,7 @@ /* PR tree-optimization/51315 */ /* Reported by Jurij Smakov */ -typedef unsigned int size_t; +typedef __SIZE_TYPE__ size_t; extern void *memcpy (void *__restrict __dest, __const void *__restrict __src, size_t __n) Index: gcc/testsuite/gcc.c-torture/execute/pr61375.c =================================================================== --- gcc/testsuite/gcc.c-torture/execute/pr61375.c.orig +++ gcc/testsuite/gcc.c-torture/execute/pr61375.c @@ -19,7 +19,7 @@ uint128_central_bitsi_ior (unsigned __in } int -main(int argc) +main(int argc, char **argv) { __int128 in = 1; #ifdef __SIZEOF_INT128__ Index: gcc/testsuite/gcc.dg/pr30904.c =================================================================== --- gcc/testsuite/gcc.dg/pr30904.c.orig +++ gcc/testsuite/gcc.dg/pr30904.c @@ -1,7 +1,7 @@ /* { dg-do link } */ /* { dg-options "-O2 -fdump-tree-optimized" } */ -extern int t; +int t; extern void link_error(void); int main (void) { Index: gcc/testsuite/gcc.c-torture/compile/callind.c =================================================================== --- gcc/testsuite/gcc.c-torture/compile/callind.c.orig +++ gcc/testsuite/gcc.c-torture/compile/callind.c @@ -1,8 +1,8 @@ -call (foo, a) +bar (foo, a) int (**foo) (); { - (foo)[1] = call; + (foo)[1] = bar; foo[a] (1); }