[ was: Re: [Patch, fortran] PR35339 Optimize implied do loops in io statements ]

On 06/03/2017 03:48 PM, Nicolas Koenig wrote:
! { dg-final { scan-tree-dump-times "while" 7 "original" } }


Hi,

I build and tested gcc in a directory with "while" in the path. That made this scan fail (with 25 matches, instead of 7), because the dump contains lines with <parm>.common.filename = &"<path>".

Fixed by making the scan more precise.

Committed as obvious.

Thanks,
- Tom
Fix scan pattern in gfortran.dg/implied_do_io_1.f90

2017-11-02  Tom de Vries  <t...@codesourcery.com>

	* gfortran.dg/implied_do_io_1.f90: Fix scan-tree-dump-times pattern.

---
 gcc/testsuite/gfortran.dg/implied_do_io_1.f90 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gfortran.dg/implied_do_io_1.f90 b/gcc/testsuite/gfortran.dg/implied_do_io_1.f90
index e4a6d6b..aef36af 100644
--- a/gcc/testsuite/gfortran.dg/implied_do_io_1.f90
+++ b/gcc/testsuite/gfortran.dg/implied_do_io_1.f90
@@ -56,4 +56,4 @@ program main
 1000 format (A2,100I4)
 end program main
 
-! { dg-final { scan-tree-dump-times "while" 7 "original" } }
+! { dg-final { scan-tree-dump-times "(?n)^\\s*while \\(1\\)$" 7 "original" } }

Reply via email to