From patchwork Tue Feb 14 21:10:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 141199 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 255A7B6FA9 for ; Wed, 15 Feb 2012 08:10:54 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1329858655; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:Received:Date:Message-Id:From:To:CC: In-reply-to:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=3hIrChCrXhR/ggDyi+p06M30lJk=; b=fX4l1FEs2Yq35fk lq6ohkdzL2JZ9Gs69yBTfFEsPTLZhOa++WEajovcEfqceUigT1YP3dALX46GqlLf w1hN/PzNImC/+GAGQw6c8lyjEns4DHNa2XlxddFkb3PZi/iDlvCuPZ9oQBWkYJk9 NIWKfZNC0xU3tGLcUAYKhPkYJzZM= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:Received:Received:Received:Date:Message-Id:From:To:CC:In-reply-to:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=NE7h5owzE+yLPKhWaUZgQSgvBDS8MM7yk1U+eKKFYqXhPTii7hhDwyap8qgg/X aJZJU+1jvVQnUZW+DJWN2pboUyECh+3n8/PUcxgzRtobYL0JPnkluFx2uKSMROIB BpU101tHrBtu5/hsl15xWXpWVPMs1saiqDfbgp0akHAnk=; Received: (qmail 26479 invoked by alias); 14 Feb 2012 21:10:50 -0000 Received: (qmail 26468 invoked by uid 22791); 14 Feb 2012 21:10:48 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ra.se.axis.com (HELO ra.se.axis.com) (195.60.68.13) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 14 Feb 2012 21:10:34 +0000 Received: from localhost (localhost [127.0.0.1]) by ra.se.axis.com (Postfix) with ESMTP id A1EE2167379; Tue, 14 Feb 2012 22:10:32 +0100 (CET) Received: from ra.se.axis.com ([127.0.0.1]) by localhost (ra.se.axis.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nfkozfn125st; Tue, 14 Feb 2012 22:10:31 +0100 (CET) Received: from thoth.se.axis.com (thoth.se.axis.com [10.0.2.173]) by ra.se.axis.com (Postfix) with ESMTP id 84BD9167367; Tue, 14 Feb 2012 22:10:31 +0100 (CET) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by thoth.se.axis.com (Postfix) with ESMTP id 4FA4134050; Tue, 14 Feb 2012 22:10:31 +0100 (CET) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id q1ELAUF6025868; Tue, 14 Feb 2012 22:10:30 +0100 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id q1ELASSl025864; Tue, 14 Feb 2012 22:10:28 +0100 Date: Tue, 14 Feb 2012 22:10:28 +0100 Message-Id: <201202142110.q1ELASSl025864@ignucius.se.axis.com> From: Hans-Peter Nilsson To: ebotcazou@adacore.com CC: gcc-patches@gcc.gnu.org In-reply-to: (message from Hans-Peter Nilsson on Tue, 14 Feb 2012 03:30:44 +0100) Subject: Fix testsuite regressions with -fgnu-tm MIME-Version: 1.0 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 > From: Hans-Peter Nilsson > Date: Tue, 14 Feb 2012 03:30:44 +0100 > you need to gate *all* tm-related > tests on something like check_effective_target_pthread. Like this, tested cris-elf, fixes the regressions, does the same as -fopenmp. Ok? gcc/testsuite: * lib/target-supports.exp (check_effective_target_fgnu_tm): New proc. * gfortran.dg/trans-mem-skel.f90: Gate test on effective_target fgnu_tm. * gcc.dg/lto/trans-mem-1_0.c, gcc.dg/lto/trans-mem-2_0.c, gcc.dg/lto/trans-mem-3_0.c, gcc.dg/lto/trans-mem-4_0.c: Ditto. * gcc.dg/tm/tm.exp: Gate the whole of gcc.dg/tm on effective_target fgnu_tm. * g++.dg/tm/tm.exp: Ditto for g++.dg/tm. brgds, H-P Index: lib/target-supports.exp =================================================================== --- lib/target-supports.exp (revision 184203) +++ lib/target-supports.exp (working copy) @@ -716,6 +716,15 @@ proc check_effective_target_fopenmp {} { } "-fopenmp"] } +# Return 1 if compilation with -fgnu-tm is error-free for trivial +# code, 0 otherwise. + +proc check_effective_target_fgnu_tm {} { + return [check_no_compiler_messages fgnu_tm object { + void foo (void) { } + } "-fgnu-tm"] +} + # Return 1 if the target supports mmap, 0 otherwise. proc check_effective_target_mmap {} { Index: gfortran.dg/trans-mem-skel.f90 =================================================================== --- gfortran.dg/trans-mem-skel.f90 (revision 184203) +++ gfortran.dg/trans-mem-skel.f90 (working copy) @@ -1,5 +1,6 @@ ! { dg-do compile } ! { dg-options "-fgnu-tm" } +! { dg-require-effective-target fgnu_tm } program foo real x end program foo Index: gcc.dg/lto/trans-mem-2_0.c =================================================================== --- gcc.dg/lto/trans-mem-2_0.c (revision 184203) +++ gcc.dg/lto/trans-mem-2_0.c (working copy) @@ -1,6 +1,7 @@ /* { dg-lto-options {{-flto -fgnu-tm}} } */ /* { dg-lto-do link } */ /* { dg-require-effective-target stdint_types } */ +/* { dg-require-effective-target fgnu_tm } */ #include "trans-mem.h" Index: gcc.dg/lto/trans-mem-4_0.c =================================================================== --- gcc.dg/lto/trans-mem-4_0.c (revision 184203) +++ gcc.dg/lto/trans-mem-4_0.c (working copy) @@ -1,6 +1,7 @@ /* { dg-lto-options {{-flto -fgnu-tm}} } */ /* { dg-lto-do link } */ /* { dg-require-effective-target stdint_types } */ +/* { dg-require-effective-target fgnu_tm } */ extern void foo() __attribute__((transaction_safe)); Index: gcc.dg/lto/trans-mem-1_0.c =================================================================== --- gcc.dg/lto/trans-mem-1_0.c (revision 184203) +++ gcc.dg/lto/trans-mem-1_0.c (working copy) @@ -1,6 +1,7 @@ /* { dg-lto-options {{-flto -fgnu-tm}} } */ /* { dg-lto-do link } */ /* { dg-require-effective-target stdint_types } */ +/* { dg-require-effective-target fgnu_tm } */ int i; Index: gcc.dg/lto/trans-mem-3_0.c =================================================================== --- gcc.dg/lto/trans-mem-3_0.c (revision 184203) +++ gcc.dg/lto/trans-mem-3_0.c (working copy) @@ -1,6 +1,7 @@ /* { dg-lto-options {{-flto}} } */ /* { dg-lto-do link } */ /* { dg-require-effective-target stdint_types } */ +/* { dg-require-effective-target fgnu_tm } */ /* Test that we can build one object file with -fgnu-tm (trans-mem-3_1.c), but do the final link of all objects without Index: gcc.dg/tm/tm.exp =================================================================== --- gcc.dg/tm/tm.exp (revision 184203) +++ gcc.dg/tm/tm.exp (working copy) @@ -19,6 +19,10 @@ # Load support procs. load_lib gcc-dg.exp +if ![check_effective_target_fgnu_tm] { + return +} + # If a testcase doesn't have special options, use these. global DEFAULT_CFLAGS if ![info exists DEFAULT_CFLAGS] then { Index: g++.dg/tm/tm.exp =================================================================== --- g++.dg/tm/tm.exp (revision 184203) +++ g++.dg/tm/tm.exp (working copy) @@ -19,6 +19,10 @@ # Load support procs. load_lib g++-dg.exp +if ![check_effective_target_fgnu_tm] { + return +} + # If a testcase doesn't have special options, use these. global DEFAULT_CXXFLAGS if ![info exists DEFAULT_CXXFLAGS] then {