This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix spurious tree-ssa test case failures
- From: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 25 Sep 2004 22:58:23 +0200 (CEST)
- Subject: [committed] Fix spurious tree-ssa test case failures
Hello,
I've had spurious test case failures of tree-ssa/loop-[24].c because
the regular expression in
scan-tree-dump-times "arr_base.*=" 0 "vars"
was processed in non-newline mode, causing it match even though
all assignment via arr_base had in fact been strength-reduced.
(It would match e.g.
ivtmp.5 = &arr_base[0].y;
ivtmp.11 = 0;
from arr_base to the = in the next line.)
Fixed by not allowing new-line characters to be matched.
Tested on s390-ibm-linux and s390x-ibm-linux; fixes the two cases
(on s390; on s390x they still fail for good because the loops
aren't in fact strength-reduced).
Committed to mainline as obvious.
Bye,
Ulrich
ChangeLog:
* gcc.dg/tree-ssa/loop-2.c: Avoid matching new-line in regexp.
* gcc.dg/tree-ssa/loop-4.c: Likewise.
Index: gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c,v
retrieving revision 1.1
diff -c -p -r1.1 loop-2.c
*** gcc/testsuite/gcc.dg/tree-ssa/loop-2.c 5 Sep 2004 09:25:37 -0000 1.1
--- gcc/testsuite/gcc.dg/tree-ssa/loop-2.c 25 Sep 2004 20:45:13 -0000
*************** void xxx(void)
*** 23,29 ****
/* Access to arr_base[iter].y should be strength reduced. */
! /* { dg-final { scan-tree-dump-times "arr_base.*=" 0 "vars" } } */
/* 17 * iter should be strength reduced. */
--- 23,29 ----
/* Access to arr_base[iter].y should be strength reduced. */
! /* { dg-final { scan-tree-dump-times "arr_base\[^\\n\\r\]*=" 0 "vars" } } */
/* 17 * iter should be strength reduced. */
Index: gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c,v
retrieving revision 1.1
diff -c -p -r1.1 loop-4.c
*** gcc/testsuite/gcc.dg/tree-ssa/loop-4.c 5 Sep 2004 09:25:37 -0000 1.1
--- gcc/testsuite/gcc.dg/tree-ssa/loop-4.c 25 Sep 2004 20:45:13 -0000
*************** void xxx(void)
*** 25,31 ****
/* Access to arr_base[iter].y should be strength reduced. */
! /* { dg-final { scan-tree-dump-times "arr_base.*=" 0 "vars" } } */
/* And the original induction variable should be eliminated. */
--- 25,31 ----
/* Access to arr_base[iter].y should be strength reduced. */
! /* { dg-final { scan-tree-dump-times "arr_base\[^\\n\\r\]*=" 0 "vars" } } */
/* And the original induction variable should be eliminated. */
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de