aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorChris Demetriou <cgd@broadcom.com>2003-10-02 15:57:58 +0000
committerChris Demetriou <cgd@gcc.gnu.org>2003-10-02 08:57:58 -0700
commit910a2080298cb3e237bf24d61ec24df282d01c69 (patch)
tree8f7e2550134e279c8c35a7fc0adc519ee41575a1 /gcc
parentd801e245eb2de44d83d5733b94a82361075d268c (diff)
downloadgcc-910a2080298cb3e237bf24d61ec24df282d01c69.zip
gcc-910a2080298cb3e237bf24d61ec24df282d01c69.tar.gz
gcc-910a2080298cb3e237bf24d61ec24df282d01c69.tar.bz2
f-torture.exp (search_for): Rename to...
2003-10-02 Chris Demetriou <cgd@broadcom.com> * lib/f-torture.exp (search_for): Rename to... (search_for_re): This. Also, clean up comments and the "regexp" invocation. From-SVN: r72039
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/lib/f-torture.exp13
2 files changed, 12 insertions, 7 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 0866df3..f69251b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2003-10-02 Chris Demetriou <cgd@broadcom.com>
+
+ * lib/f-torture.exp (search_for): Rename to...
+ (search_for_re): This. Also, clean up comments and the
+ "regexp" invocation.
+
2003-10-02 Josef Zlomek <zlomekj@suse.cz>
* gcc.c-torture/compile/20031002-1.c: New test.
diff --git a/gcc/testsuite/lib/f-torture.exp b/gcc/testsuite/lib/f-torture.exp
index b9ae904..88e8773 100644
--- a/gcc/testsuite/lib/f-torture.exp
+++ b/gcc/testsuite/lib/f-torture.exp
@@ -146,7 +146,7 @@ proc f-torture-execute { src } {
# Look for a loop within the source code - if we don't find one,
# don't pass -funroll[-all]-loops.
global torture_with_loops torture_without_loops
- if [expr [search_for $src "do *\[0-9\]"]+[search_for $src "end *do"]] then {
+ if [expr [search_for_re $src "do *\[0-9\]"]+[search_for_re $src "end *do"]] then {
set option_list $torture_with_loops
} else {
set option_list $torture_without_loops
@@ -232,7 +232,7 @@ proc f-torture-execute { src } {
# See if this source file uses "long long" types, if it does, and
# no_long_long is set, skip execution of the test.
if [target_info exists no_long_long] then {
- if [expr [search_for $src "integer\*8"]] then {
+ if [expr [search_for_re $src "integer\*8"]] then {
untested "$testcase execution, $option"
continue
}
@@ -257,13 +257,12 @@ proc f-torture-execute { src } {
}
#
-# search_for -- looks for a string match in a file
+# search_for_re -- looks for a case-insensitive regexp match in a file
#
-proc search_for { file pattern } {
+proc search_for_re { file pattern } {
set fd [open $file r]
while { [gets $fd cur_line]>=0 } {
- set lower [string tolower $cur_line]
- if [regexp "$pattern" $lower] then {
+ if [regexp -nocase -- "$pattern" $cur_line] then {
close $fd
return 1
}
@@ -311,7 +310,7 @@ proc f-torture { args } {
# Look for a loop within the source code - if we don't find one,
# don't pass -funroll[-all]-loops.
global torture_with_loops torture_without_loops
- if [expr [search_for $src "do *\[0-9\]"]+[search_for $src "end *do"]] then {
+ if [expr [search_for_re $src "do *\[0-9\]"]+[search_for_re $src "end *do"]] then {
set option_list $torture_with_loops
} else {
set option_list $torture_without_loops