From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4858 invoked by alias); 16 Oct 2008 13:59:42 -0000 Received: (qmail 4848 invoked by uid 22791); 16 Oct 2008 13:59:41 -0000 X-Spam-Check-By: sourceware.org Received: from an-out-0708.google.com (HELO an-out-0708.google.com) (209.85.132.242) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 16 Oct 2008 13:59:01 +0000 Received: by an-out-0708.google.com with SMTP id c28so122ana.104 for ; Thu, 16 Oct 2008 06:58:57 -0700 (PDT) Received: by 10.210.36.8 with SMTP id j8mr2912722ebj.155.1224165536299; Thu, 16 Oct 2008 06:58:56 -0700 (PDT) Received: from legolas.novillo.homelinux.org (CPE000f6636bf6c-CM00407b85cf5d.cpe.net.cable.rogers.com [99.229.48.247]) by mx.google.com with ESMTPS id d2sm1247700nfc.20.2008.10.16.06.58.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 16 Oct 2008 06:58:55 -0700 (PDT) Received: from legolas.novillo.homelinux.org (localhost.localdomain [127.0.0.1]) by legolas.novillo.homelinux.org (8.14.2/8.14.2) with ESMTP id m9GDwq8c025935 for ; Thu, 16 Oct 2008 09:58:52 -0400 Received: (from dnovillo@localhost) by legolas.novillo.homelinux.org (8.14.2/8.14.2/Submit) id m9GDwlpM025930 for gcc-patches@gcc.gnu.org; Thu, 16 Oct 2008 09:58:47 -0400 Date: Thu, 16 Oct 2008 15:09:00 -0000 From: Diego Novillo To: gcc-patches@gcc.gnu.org Subject: [lto] Fix botched -flto flags in testsuite Message-ID: <20081016135847.GA25747@legolas> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2008-10/txt/msg00706.txt.bz2 Thanks to Rafael for noticing this. When I added -flto to the testsuite I didn't look close enough at the new failures. Some of them were failing for the obvious reason that the flags were being passed incorrectly. This patch fixes that. Tested on x86_64. This time I did check for the obvious. Diego. * gcc.dg/debug/debug.exp: Fix -flto options * gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp: Likewise. * gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp: Likewise. * gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp: Likewise. * gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp: Likewise. * gcc.dg/vect/vect.exp: Likewise. * gcc.misc-tests/dectest.exp: Likewise. * g++.dg/debug/debug.exp: Likewise. * g++.dg/vect/vect.exp: Likewise. Index: testsuite/gcc.dg/debug/debug.exp =================================================================== --- testsuite/gcc.dg/debug/debug.exp (revision 141168) +++ testsuite/gcc.dg/debug/debug.exp (working copy) @@ -24,7 +24,7 @@ dg-init # Main loop. -gcc-dg-debug-runtest gcc_target_compile trivial.c [list "-O -flto" "-O3 -flto"] \ +gcc-dg-debug-runtest gcc_target_compile trivial.c [list -O -O3 -flto] \ [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] # All done. Index: testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp =================================================================== --- testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp (revision 141168) +++ testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp (working copy) @@ -33,7 +33,7 @@ if ![is-effective-target powerpc_altivec set DEFAULT_VECTCFLAGS "" # These flags are used for all targets. -lappend DEFAULT_VECTCFLAGS "-O2 -flto" "-ftree-vectorize" "-fvect-cost-model" +lappend DEFAULT_VECTCFLAGS "-O2" "-flto" "-ftree-vectorize" "-fvect-cost-model" # If the target system supports vector instructions, the default action # for a test is 'run', otherwise it's 'compile'. Save current default. Index: testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp =================================================================== --- testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp (revision 141168) +++ testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp (working copy) @@ -29,7 +29,7 @@ if { ![istarget spu*-*-*] } then { set DEFAULT_VECTCFLAGS "" # These flags are used for all targets. -lappend DEFAULT_VECTCFLAGS "-O2 -flto" "-ftree-vectorize" "-fvect-cost-model" +lappend DEFAULT_VECTCFLAGS "-O2" "-flto" "-ftree-vectorize" "-fvect-cost-model" # If the target system supports vector instructions, the default action # for a test is 'run', otherwise it's 'compile'. Save current default. Index: testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp =================================================================== --- testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp (revision 141168) +++ testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp (working copy) @@ -28,7 +28,7 @@ if { ![istarget i?86*-*-*] && ![istarget set DEFAULT_VECTCFLAGS "" # These flags are used for all targets. -lappend DEFAULT_VECTCFLAGS "-O2 -flto" "-ftree-vectorize" "-fvect-cost-model" +lappend DEFAULT_VECTCFLAGS "-O2" "-flto" "-ftree-vectorize" "-fvect-cost-model" # If the target system supports vector instructions, the default action # for a test is 'run', otherwise it's 'compile'. Save current default. Index: testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp =================================================================== --- testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp (revision 141168) +++ testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp (working copy) @@ -29,7 +29,7 @@ if { (![istarget x86_64-*-*] && ![istarg set DEFAULT_VECTCFLAGS "" # These flags are used for all targets. -lappend DEFAULT_VECTCFLAGS "-O2 -flto" "-ftree-vectorize" "-fvect-cost-model" +lappend DEFAULT_VECTCFLAGS "-O2" "-flto" "-ftree-vectorize" "-fvect-cost-model" # If the target system supports vector instructions, the default action # for a test is 'run', otherwise it's 'compile'. Save current default. Index: testsuite/gcc.dg/vect/vect.exp =================================================================== --- testsuite/gcc.dg/vect/vect.exp (revision 141168) +++ testsuite/gcc.dg/vect/vect.exp (working copy) @@ -111,10 +111,12 @@ dg-init global O1_VECTCFLAGS set O1_VECTCFLAGS $DEFAULT_VECTCFLAGS -lappend O1_VECTCFLAGS "-O1 -flto" +lappend O1_VECTCFLAGS "-O1" +lappend O1_VECTCFLAGS "-flto" lappend O1_VECTCFLAGS "-fdump-tree-vect-details" -lappend DEFAULT_VECTCFLAGS "-O2 -flto" +lappend DEFAULT_VECTCFLAGS "-O2" +lappend DEFAULT_VECTCFLAGS "-flto" # Tests that should be run without generating dump info dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/nodump-*.\[cS\]]] \ @@ -238,13 +240,15 @@ dg-runtest [lsort [glob -nocomplain $src # With -Os set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS -lappend DEFAULT_VECTCFLAGS "-Os -flto" +lappend DEFAULT_VECTCFLAGS "-Os" +lappend DEFAULT_VECTCFLAGS "-flto" dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/Os-vect-*.\[cS\]]] \ "" $DEFAULT_VECTCFLAGS # With -O3 set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS -lappend DEFAULT_VECTCFLAGS "-O3 -flto" +lappend DEFAULT_VECTCFLAGS "-O3" +lappend DEFAULT_VECTCFLAGS "-flto" if [istarget "spu-*-*"] { lappend DEFAULT_VECTCFLAGS "-funroll-loops" } Index: testsuite/gcc.misc-tests/dectest.exp =================================================================== --- testsuite/gcc.misc-tests/dectest.exp (revision 141168) +++ testsuite/gcc.misc-tests/dectest.exp (working copy) @@ -20,7 +20,7 @@ # # Contributed by Ben Elliston . -set DEC_TORTURE_OPTIONS [list {} -O1 "-O2 -flto" -O3 -Os -msoft-float] +set DEC_TORTURE_OPTIONS [list {} -O1 {-O2 -flto} -O3 -Os -msoft-float] proc target-specific-flags {} { set result "-frounding-math " Index: testsuite/g++.dg/debug/debug.exp =================================================================== --- testsuite/g++.dg/debug/debug.exp (revision 141168) +++ testsuite/g++.dg/debug/debug.exp (working copy) @@ -23,7 +23,7 @@ load_lib g++-dg.exp dg-init # Main loop. -gcc-dg-debug-runtest g++_target_compile trivial.C [list "-O2 -flto" "-O3 -flto"] \ +gcc-dg-debug-runtest g++_target_compile trivial.C [list -O2 -O3 -flto] \ [lsort [glob -nocomplain $srcdir/$subdir/*.C]] # All done. Index: testsuite/g++.dg/vect/vect.exp =================================================================== --- testsuite/g++.dg/vect/vect.exp (revision 141168) +++ testsuite/g++.dg/vect/vect.exp (working copy) @@ -39,8 +39,8 @@ set save-dg-do-what-default ${dg-do-what set DEFAULT_VECTCFLAGS "" # These flags are used for all targets. -lappend DEFAULT_VECTCFLAGS "-O2 -flto" "-ftree-vectorize" "-fno-vect-cost-model" \ - "-ftree-vectorizer-verbose=4" "-fdump-tree-vect-stats" +lappend DEFAULT_VECTCFLAGS "-O2" "-flto" "-ftree-vectorize" \ + "-fno-vect-cost-model" "-ftree-vectorizer-verbose=4" "-fdump-tree-vect-stats" # Skip these tests for targets that do not support generating vector # code. Set additional target-dependent vector flags, which can be