From patchwork Wed Apr 10 17:13:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Uros Bizjak X-Patchwork-Id: 235433 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 098BC2C00D8 for ; Thu, 11 Apr 2013 03:13:44 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=Gr9V5n2keEBUrkjF1GOEibCWs2AojGuUgnUFEPqTe1ImAb M4cA/sFmkI7jnNe0OYZV2RhZgGIOOpZvtP57rR+GftPOYq89jNuCCfn25ADcSLbA Z/3G1kZcM8b1+/2Nq/BVrvnn4ypl1GB5QJn5VmkEeseiPX33Ma19+NxyC8uXM= 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 :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=8YwoR4psaFH6cqw9UwtHSlKCRy0=; b=D1zYCukYcS+FkDg+S4rQ 5aRtxizL2/662Ejayhl3BGY4qGXdiuMIl6Txwk4V8bloBYDC7DOgBu166LrMZJDS C3YdRRRQSzPh0wWGjbYsgXD1WnymiccOha34gXdF+UHsi0S+3EEtdzf11K9+0Tav IIAlY4H+RLAap1MLYzI5IM0= Received: (qmail 11076 invoked by alias); 10 Apr 2013 17:13:38 -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 11066 invoked by uid 89); 10 Apr 2013 17:13:38 -0000 X-Spam-SWARE-Status: No, score=-4.2 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, TW_ZJ autolearn=ham version=3.3.1 Received: from mail-oa0-f51.google.com (HELO mail-oa0-f51.google.com) (209.85.219.51) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 10 Apr 2013 17:13:37 +0000 Received: by mail-oa0-f51.google.com with SMTP id g12so685014oah.38 for ; Wed, 10 Apr 2013 10:13:36 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.19.135 with SMTP id f7mr1019454obe.95.1365614015985; Wed, 10 Apr 2013 10:13:35 -0700 (PDT) Received: by 10.182.49.68 with HTTP; Wed, 10 Apr 2013 10:13:35 -0700 (PDT) Date: Wed, 10 Apr 2013 19:13:35 +0200 Message-ID: Subject: [PATCH, testsuite]: Avoid "error: inlining failed in call to always_inline" with -fpic From: Uros Bizjak To: "gcc-patches@gcc.gnu.org" X-Virus-Found: No Hello! Attached testsuite patch fixes: pr33992.c: In function ‘do_test’: pr33992.c:11:1: error: inlining failed in call to always_inline ‘foo’: function body can be overwritten at link time pr33992.c:28:9: error: called from here foo (r); ^ errors through gcc and g++ testsuite when tested with -fpic. 2013-04-10 Uros Bizjak * g++.dg/ipa/devirt-c-7.C: Require nonpic effective target. * gcc.c-torture/execute/pr33992.c (foo): Declare as static void. * gcc.dg/uninit-pred-5_a.c (foo): Ditto. * gcc.dg/uninit-pred-5_b.c (foo): Ditto. OK for mainline and release branches? Uros. Index: g++.dg/ipa/devirt-c-7.C =================================================================== --- g++.dg/ipa/devirt-c-7.C (revision 197646) +++ g++.dg/ipa/devirt-c-7.C (working copy) @@ -1,6 +1,7 @@ /* Verify that ipa-cp will not get confused by placement new constructing an object within another one when looking for dynamic type change . */ /* { dg-do run } */ +/* { dg-require-effective-target nonpic } */ /* { dg-options "-O3 -Wno-attributes" } */ extern "C" void abort (void); Index: gcc.c-torture/execute/pr33992.c =================================================================== --- gcc.c-torture/execute/pr33992.c (revision 197646) +++ gcc.c-torture/execute/pr33992.c (working copy) @@ -7,7 +7,7 @@ abort (); } -void __attribute__((always_inline)) +static void __attribute__((always_inline)) foo (unsigned long long *r) { int i; Index: gcc.dg/uninit-pred-5_a.c =================================================================== --- gcc.dg/uninit-pred-5_a.c (revision 197646) +++ gcc.dg/uninit-pred-5_a.c (working copy) @@ -6,8 +6,9 @@ int blah(int); void t(int); +static int __attribute__((always_inline)) -int foo (int n, int* v, int r) +foo (int n, int* v, int r) { int flag = 0; if (r > n) Index: gcc.dg/uninit-pred-5_b.c =================================================================== --- gcc.dg/uninit-pred-5_b.c (revision 197646) +++ gcc.dg/uninit-pred-5_b.c (working copy) @@ -6,8 +6,9 @@ int blah(int); void t(int); +static int __attribute__((always_inline)) -int foo (int n, int* v, int r) +foo (int n, int* v, int r) { int flag = 0; if (r > n)