gfortran's modules are since GCC 4.9 zipped. There are two functions,
which test for the existence and absent of strings in the .mod files.
While one was updated to apply gunzip before reading, the other wasn't.
This patch copies over the unzip call from the other function. I have
tested it that it properly fails if and only if the string is present in
the (uncompressed) .mod file.
OK for the trunk?
Tobias
PS: Thanks to Dominique for pointing out this problem!
2014-03-20 Tobias Burnus <bur...@net-b.de>
PR fortran/60599
* lib/gcc-dg.exp (scan-module): Uncompress .mod files for
reading.
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 59d394c..f9d52bc 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -656,7 +656,7 @@ proc scan-module { args } {
# 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 fd [open [list | gzip -dc $modfilename] r]
set text [read $fd]
close $fd