aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2020-04-09 13:56:44 +0000
committerChristophe Lyon <christophe.lyon@linaro.org>2020-04-09 14:17:48 +0000
commit93674a72309f986c9ace2d6060916053a00da2a1 (patch)
treed29b845ec3e8e179d6cfd83496d56f775c3937c9
parentf9d09df0f3552b6f179edeb038844bda40fc7534 (diff)
downloadgcc-93674a72309f986c9ace2d6060916053a00da2a1.zip
gcc-93674a72309f986c9ace2d6060916053a00da2a1.tar.gz
gcc-93674a72309f986c9ace2d6060916053a00da2a1.tar.bz2
[testsuite] scanasm.exp: Fix target-selector handling in check-function-bodies
{target { ! a } } does not work because the greedy regexp extracts "! a }" instead of "target { ! a }". This patch replaces it with a non-greedy regexp. 2020-04-09 Christophe Lyon <christophe.lyon@linaro.org> * lib/scanasm.exp (check-function-bodies): Use non-greedy regexp when extracting the target selector.
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/lib/scanasm.exp2
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e01fdb0..e692a7f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-09 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * lib/scanasm.exp (check-function-bodies): Use non-greedy regexp
+ when extracting the target selector.
+
2020-04-09 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/94482
diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp
index 8d2364f..d5f2be4 100644
--- a/gcc/testsuite/lib/scanasm.exp
+++ b/gcc/testsuite/lib/scanasm.exp
@@ -689,7 +689,7 @@ proc check-function-bodies { args } {
if { [string equal -length $prefix_len $line $prefix] } {
set line [string trim [string range $line $prefix_len end]]
if { !$in_function } {
- if { [regexp "^(.*\\S)\\s+{(.*)}\$" $line dummy \
+ if { [regexp "^(.*?\\S)\\s+{(.*)}\$" $line dummy \
line selector] } {
set selector [dg-process-target $selector]
} else {