[committed] Fix spurious tree-ssa test case failures

Ulrich Weigand weigand@i1.informatik.uni-erlangen.de
Sat Sep 25 21:56:00 GMT 2004


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



More information about the Gcc-patches mailing list