diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2012-01-01 16:27:45 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2012-01-01 16:27:45 +0000 |
commit | b4cbc46c32041cf17954de37448c22188bc0bc57 (patch) | |
tree | b2101c31d40eb2d63440b206e88507ff4ace6107 /gcc | |
parent | f2c74cc43a137f5fe81719b4b1514a665bff8766 (diff) | |
download | gcc-b4cbc46c32041cf17954de37448c22188bc0bc57.zip gcc-b4cbc46c32041cf17954de37448c22188bc0bc57.tar.gz gcc-b4cbc46c32041cf17954de37448c22188bc0bc57.tar.bz2 |
backport: re PR fortran/51502 (Potentially wrong code generation due to wrong implict_pure check)
2012-01-01 Thomas König <tkoenig@gcc.gnu.org>
Backport from trunk
PR fortran/51502
* lib/gcc-dg.exp (scan-module-absence): New function.
* gfortran.dg/implicit_pure_2.f90: New test.
From-SVN: r182771
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/lib/gcc-dg.exp | 18 |
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 143c0d1..f48bd72 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-01-01 Thomas Koenig <tkoenig@gcc.gnu.org> + + PR fortran/51502 + * lib/gcc-dg.exp (scan-module-absence): Really commit last + change. + 2012-01-01 Ira Rosen <irar@il.ibm.com> PR tree-optimization/51704 diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index d0b679d..026a8a9 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -598,6 +598,24 @@ proc scan-module { args } { } } +# Scan Fortran modules for absence of a given regexp. +# +# Argument 0 is the module name +# Argument 1 is the regexp to match +proc scan-module-absence { args } { + set modfilename [string tolower [lindex $args 0]].mod + set fd [open $modfilename r] + set text [read $fd] + close $fd + + upvar 2 name testcase + if [regexp -- [lindex $args 1] $text] { + fail "$testcase scan-module [lindex $args 1]" + } else { + pass "$testcase scan-module [lindex $args 1]" + } +} + # Verify that the compiler output file exists, invoked via dg-final. proc output-exists { args } { # Process an optional target or xfail list. |