From patchwork Tue Mar 22 15:17:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 87936 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]) by ozlabs.org (Postfix) with SMTP id E2DBBB6F07 for ; Wed, 23 Mar 2011 02:18:28 +1100 (EST) Received: (qmail 11778 invoked by alias); 22 Mar 2011 15:18:20 -0000 Received: (qmail 11749 invoked by uid 22791); 22 Mar 2011 15:18:17 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Mar 2011 15:17:59 +0000 Received: (qmail 14531 invoked from network); 22 Mar 2011 15:17:56 -0000 Received: from unknown (HELO ?84.152.188.143?) (bernds@127.0.0.2) by mail.codesourcery.com with ESMTPA; 22 Mar 2011 15:17:56 -0000 Message-ID: <4D88BD7B.4090008@codesourcery.com> Date: Tue, 22 Mar 2011 16:17:15 +0100 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110309 Lightning/1.0b3pre Thunderbird/3.1.9 MIME-Version: 1.0 To: GCC Patches Subject: Fix some LTO -fPIC testcases 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 On targets where -fpic/-fPIC produce an error, we currently fail a large number of LTO testcases. These should be using the appropriate dg-require-effective-target so that they don't get run. Ok? Bernd * g++.dg/lto/20091002-1_0.C: Use "dg-require-effective-target fpic". * g++.dg/lto/20091002-2_0.C: Likewise. * g++.dg/lto/20091004-1_0.C: Likewise. * g++.dg/lto/20091002-3_0.C: Likewise. * g++.dg/lto/20091004-2_0.C: Likewise. * g++.dg/lto/20081123_0.C: Likewise. * g++.dg/lto/20090313_0.C: Likewise. * g++.dg/lto/20081109-1_0.C: Likewise. * g++.dg/lto/20081219_0.C: Likewise. * g++.dg/lto/20081204-1_0.C: Likewise. * g++.dg/lto/20090302_0.C: Likewise. * g++.dg/lto/20081119-1_0.C: Likewise. * g++.dg/lto/20081118_0.C: Likewise. * gcc.dg/lto/20091020-2_0.c: Likewise. * gcc.dg/lto/20090210_0.c: Likewise. * gcc.dg/lto/20081204-1_0.c: Likewise. * gcc.dg/lto/20081224_0.c: Likewise. * gcc.dg/lto/20090219_0.c: Likewise. * gcc.dg/lto/20091014-1_0.c: Likewise. * gcc.dg/lto/20091016-1_0.c: Likewise. * gcc.dg/lto/20090206-2_0.c: Likewise. * gcc.dg/lto/20090116_0.c: Likewise. * gcc.dg/lto/20091013-1_0.c: Likewise. * gcc.dg/lto/20091015-1_0.c: Likewise. * gcc.dg/lto/20090126-2_0.c: Likewise. Index: gcc/testsuite/g++.dg/lto/20091002-1_0.C =================================================================== --- gcc/testsuite/g++.dg/lto/20091002-1_0.C.orig +++ gcc/testsuite/g++.dg/lto/20091002-1_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target fpic } // { dg-lto-options {{-fPIC -flto}} } // { dg-extra-ld-options "-fPIC -r -nostdlib" } Index: gcc/testsuite/g++.dg/lto/20091002-2_0.C =================================================================== --- gcc/testsuite/g++.dg/lto/20091002-2_0.C.orig +++ gcc/testsuite/g++.dg/lto/20091002-2_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target fpic } // { dg-lto-options {{-fPIC}} } // { dg-extra-ld-options "-fPIC -r -nostdlib" } Index: gcc/testsuite/g++.dg/lto/20091002-3_0.C =================================================================== --- gcc/testsuite/g++.dg/lto/20091002-3_0.C.orig +++ gcc/testsuite/g++.dg/lto/20091002-3_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target fpic } // { dg-lto-options {{-fPIC}} } // { dg-extra-ld-options "-fPIC -r -nostdlib" } Index: gcc/testsuite/g++.dg/lto/20091004-1_0.C =================================================================== --- gcc/testsuite/g++.dg/lto/20091004-1_0.C.orig +++ gcc/testsuite/g++.dg/lto/20091004-1_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target fpic } // { dg-lto-options {{-fPIC -O -flto}} } typedef double Real; Index: gcc/testsuite/g++.dg/lto/20091004-2_0.C =================================================================== --- gcc/testsuite/g++.dg/lto/20091004-2_0.C.orig +++ gcc/testsuite/g++.dg/lto/20091004-2_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target fpic } // { dg-lto-options {{-fPIC -O -flto}} } typedef double Real; Index: gcc/testsuite/g++.dg/lto/20081123_0.C =================================================================== --- gcc/testsuite/g++.dg/lto/20081123_0.C.orig +++ gcc/testsuite/g++.dg/lto/20081123_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target fpic } // { dg-lto-options {{-flto -flto-partition=1to1 -r -nostdlib -fPIC}} } int Index: gcc/testsuite/g++.dg/lto/20090313_0.C =================================================================== --- gcc/testsuite/g++.dg/lto/20090313_0.C.orig +++ gcc/testsuite/g++.dg/lto/20090313_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target fpic } // { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} } // { dg-extra-ld-options "-flto -flto-partition=1to1 -r -nostdlib" } Index: gcc/testsuite/g++.dg/lto/20081109-1_0.C =================================================================== --- gcc/testsuite/g++.dg/lto/20081109-1_0.C.orig +++ gcc/testsuite/g++.dg/lto/20081109-1_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target fpic } // { dg-lto-options {{-fPIC -flto -flto-partition=1to1}} } // { dg-extra-ld-options "-fPIC -flto -flto-partition=1to1 -r -nostdlib -fno-exceptions" } void func(); class Foo { }; Index: gcc/testsuite/g++.dg/lto/20081219_0.C =================================================================== --- gcc/testsuite/g++.dg/lto/20081219_0.C.orig +++ gcc/testsuite/g++.dg/lto/20081219_0.C @@ -1,4 +1,5 @@ // { dg-lto-do link } +// { dg-require-effective-target fpic } // { dg-lto-options {{-fPIC -flto -flto-partition=1to1 -O2}} } // { dg-extra-ld-options "-O2 -fPIC -flto -flto-partition=1to1 -r -nostdlib" } Index: gcc/testsuite/g++.dg/lto/20081204-1_0.C =================================================================== --- gcc/testsuite/g++.dg/lto/20081204-1_0.C.orig +++ gcc/testsuite/g++.dg/lto/20081204-1_0.C @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC -r -nostdlib}} } */ /* Tests for the absence during linking of: Index: gcc/testsuite/g++.dg/lto/20090302_0.C =================================================================== --- gcc/testsuite/g++.dg/lto/20090302_0.C.orig +++ gcc/testsuite/g++.dg/lto/20090302_0.C @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-fPIC -flto -flto-partition=1to1 -r -nostdlib}} } */ struct Foo { bool Mumble(); Index: gcc/testsuite/g++.dg/lto/20081119-1_0.C =================================================================== --- gcc/testsuite/g++.dg/lto/20081119-1_0.C.orig +++ gcc/testsuite/g++.dg/lto/20081119-1_0.C @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-fPIC -flto -flto-partition=1to1 -r -nostdlib}} } */ #include "20081119-1.h" Index: gcc/testsuite/g++.dg/lto/20081118_0.C =================================================================== --- gcc/testsuite/g++.dg/lto/20081118_0.C.orig +++ gcc/testsuite/g++.dg/lto/20081118_0.C @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-fPIC -flto -flto-partition=1to1 -r -nostdlib}} } */ /* We used to ICE because of dangling pointers. */ Index: gcc/testsuite/gcc.dg/lto/20091014-1_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/20091014-1_0.c.orig +++ gcc/testsuite/gcc.dg/lto/20091014-1_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-fPIC -r -nostdlib -flto}} } */ /* Empty file. See PR41173. */ Index: gcc/testsuite/gcc.dg/lto/20091016-1_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/20091016-1_0.c.orig +++ gcc/testsuite/gcc.dg/lto/20091016-1_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-fPIC -r -nostdlib -O2 -flto}} } */ typedef struct VEC_constructor_elt_gc { } VEC_constructor_elt_gc; Index: gcc/testsuite/gcc.dg/lto/20090206-2_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/20090206-2_0.c.orig +++ gcc/testsuite/gcc.dg/lto/20090206-2_0.c @@ -1,5 +1,6 @@ /* { dg-lto-do link } */ /* { dg-skip-if "" { ! { i?86-*-linux* x86_64-*-linux* } } { "*" } { "" } } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} } */ /* { dg-suppress-ld-options {-fPIC} } */ Index: gcc/testsuite/gcc.dg/lto/20090116_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/20090116_0.c.orig +++ gcc/testsuite/gcc.dg/lto/20090116_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-O1 -flto -flto-partition=1to1 -fPIC}} } */ /* { dg-extra-ld-options {-r -nostdlib -O0} } */ Index: gcc/testsuite/gcc.dg/lto/20091013-1_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/20091013-1_0.c.orig +++ gcc/testsuite/gcc.dg/lto/20091013-1_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-fPIC -r -nostdlib -flto} {-fPIC -r -nostdlib -O2 -flto}} } */ void * HeapAlloc(void*,unsigned int,unsigned long); Index: gcc/testsuite/gcc.dg/lto/20091015-1_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/20091015-1_0.c.orig +++ gcc/testsuite/gcc.dg/lto/20091015-1_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-fPIC -r -nostdlib -O2 -flto} {-fPIC -r -nostdlib -O2 -flto -flto-partition=1to1}} } */ #include "20091015-1_b.h" Index: gcc/testsuite/gcc.dg/lto/20090126-2_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/20090126-2_0.c.orig +++ gcc/testsuite/gcc.dg/lto/20090126-2_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-fPIC -O2 -flto -flto-partition=1to1}} } */ /* { dg-extra-ld-options {-fno-PIC -r -nostdlib -O2 -flto -flto-partition=1to1} } */ Index: gcc/testsuite/gcc.dg/lto/20091020-1_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/20091020-1_0.c.orig +++ gcc/testsuite/gcc.dg/lto/20091020-1_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-fPIC -r -nostdlib -flto}} } */ typedef struct { Index: gcc/testsuite/gcc.dg/lto/20091020-2_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/20091020-2_0.c.orig +++ gcc/testsuite/gcc.dg/lto/20091020-2_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-fPIC -r -nostdlib -flto}} } */ typedef struct { Index: gcc/testsuite/gcc.dg/lto/20090210_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/20090210_0.c.orig +++ gcc/testsuite/gcc.dg/lto/20090210_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do run } */ +/* { dg-require-effective-target fpic } */ /* { dg-suppress-ld-options {-fPIC} } */ /* { dg-require-effective-target tls } */ /* { dg-extra-ld-options "-pthread" { target *-*-solaris2.[89] } } */ Index: gcc/testsuite/gcc.dg/lto/20081204-1_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/20081204-1_0.c.orig +++ gcc/testsuite/gcc.dg/lto/20081204-1_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC -r -nostdlib}} } */ /* Tests for the absence during linking of: Index: gcc/testsuite/gcc.dg/lto/20081224_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/20081224_0.c.orig +++ gcc/testsuite/gcc.dg/lto/20081224_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-flto -flto-partition=1to1 -r -nostdlib -fPIC}} } */ #include "20081224_0.h" Index: gcc/testsuite/gcc.dg/lto/20090219_0.c =================================================================== --- gcc/testsuite/gcc.dg/lto/20090219_0.c.orig +++ gcc/testsuite/gcc.dg/lto/20090219_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target fpic } */ /* { dg-lto-options {{-O3 -flto -flto-partition=1to1 -fPIC -r -nostdlib}} } */ struct Foo { int f1, f2, f3, f4, f5; };