From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25809 invoked by alias); 2 Jul 2011 00:45:37 -0000 Received: (qmail 25800 invoked by uid 22791); 2 Jul 2011 00:45:36 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 02 Jul 2011 00:45:21 +0000 Received: from wpaz33.hot.corp.google.com (wpaz33.hot.corp.google.com [172.24.198.97]) by smtp-out.google.com with ESMTP id p620jKrH029020; Fri, 1 Jul 2011 17:45:20 -0700 Received: from gchare.mtv.corp.google.com (gchare.mtv.corp.google.com [172.18.111.122]) by wpaz33.hot.corp.google.com with ESMTP id p620jJYv028369; Fri, 1 Jul 2011 17:45:19 -0700 Received: by gchare.mtv.corp.google.com (Postfix, from userid 138564) id EE2601C1CDF; Fri, 1 Jul 2011 17:45:18 -0700 (PDT) To: reply@codereview.appspotmail.com, crowl@google.com, dnovillo@google.com, gcc-patches@gcc.gnu.org Subject: [pph] Fix executable test detection (issue4635087) Message-Id: <20110702004518.EE2601C1CDF@gchare.mtv.corp.google.com> Date: Sat, 02 Jul 2011 00:45:00 -0000 From: gchare@google.com (Gabriel Charette) X-System-Of-Record: true 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: 2011-07/txt/msg00117.txt.bz2 [string compare "dg-do-what" "run"] which was used before would always return true. Thus the tests would no longer even get to the asm diff section... Me and Lawrence tried to find a way to get the content of the "dg-do-what" variable, but couldn't. We decided to revert to this quick hack fix for now (better then not running the asm diffs...) (I also added an unrelated re-ordering to the order of the pph asm xdiff comment in c1varoder.cc) 2011-07-01 Gabriel Charette * g++.dg/pph/c1varorder.cc: Moved pph asm xdiff comment to top. * lib/dg-pph.exp (proc): Fixed executable test detection. diff --git a/gcc/testsuite/g++.dg/pph/c1varorder.cc b/gcc/testsuite/g++.dg/pph/c1varorder.cc index 2db8209..a7a65ec 100644 --- a/gcc/testsuite/g++.dg/pph/c1varorder.cc +++ b/gcc/testsuite/g++.dg/pph/c1varorder.cc @@ -1,6 +1,7 @@ -#include "c1varorder.h" // pph asm xdiff +#include "c1varorder.h" + int foo(void) { return var1 - var2; diff --git a/gcc/testsuite/lib/dg-pph.exp b/gcc/testsuite/lib/dg-pph.exp index b701ce2..e34bd63 100644 --- a/gcc/testsuite/lib/dg-pph.exp +++ b/gcc/testsuite/lib/dg-pph.exp @@ -74,8 +74,11 @@ proc dg-pph-pos { subdir test options mapflag suffix } { set dg-do-what-default compile dg-test -keep-output $test "$options -I." "" + # Determine whether this is an executable test + set is_exec [llength [grep $test "dg-do run"]] + # Executables do not generate assembly. - if { ![string compare "dg-do-what" "run"] } { + if { !$is_exec } { # Not executable, so quit if it did not compile successfully. if { ![file_on_host exists "$bname.s"] } { fail "$nshort $options (regular assembly missing)" @@ -93,7 +96,7 @@ proc dg-pph-pos { subdir test options mapflag suffix } { dg-test -keep-output $test "$options $mapflag -I." "" # Executables do not generate assembly, - if { [string compare "dg-do-what" "run"] } { + if { $is_exec } { # and so we are done testing. return } -- This patch is available for review at http://codereview.appspot.com/4635087