[string compare "dg-do-what" "run"] which was used before would always return true. Thus the tests ...
13 years, 9 months ago
(2011-07-02 00:45:21 UTC)
#1
[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 <gchare@google.com>
* 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
LGTM On 7/1/11, Gabriel Charette <gchare@google.com> wrote: > [string compare "dg-do-what" "run"] which was used ...
13 years, 9 months ago
(2011-07-02 00:46:50 UTC)
#2
LGTM
On 7/1/11, Gabriel Charette <gchare@google.com> wrote:
> [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 <gchare@google.com>
>
> * 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
>
--
Lawrence Crowl
I should add that this exposed two assembly comparison failures which slipped in a previous ...
13 years, 9 months ago
(2011-07-02 00:56:20 UTC)
#3
I should add that this exposed two assembly comparison failures which slipped in
a previous check-in when this problem was still up.
Namely:
FAIL: g++.dg/pph/x1dynarray0.cc (assembly comparison)
FAIL: g++.dg/pph/x1dynarray1.cc (assembly comparison)
Lawrence is reorganizing those tests as we speak and told me not to bother
marking them as `pph asm xdiff` as part of this check-in.
Issue 4635087: [pph] Fix executable test detection
(Closed)
Created 13 years, 9 months ago by Gabriel Charette
Modified 13 years, 9 months ago
Reviewers: Lawrence Crowl, Diego Novillo
Base URL:
Comments: 0