Commit 93674a72 by Christophe Lyon

[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.
parent f9d09df0
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> 2020-04-09 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/94482 PR tree-optimization/94482
......
...@@ -689,7 +689,7 @@ proc check-function-bodies { args } { ...@@ -689,7 +689,7 @@ proc check-function-bodies { args } {
if { [string equal -length $prefix_len $line $prefix] } { if { [string equal -length $prefix_len $line $prefix] } {
set line [string trim [string range $line $prefix_len end]] set line [string trim [string range $line $prefix_len end]]
if { !$in_function } { if { !$in_function } {
if { [regexp "^(.*\\S)\\s+{(.*)}\$" $line dummy \ if { [regexp "^(.*?\\S)\\s+{(.*)}\$" $line dummy \
line selector] } { line selector] } {
set selector [dg-process-target $selector] set selector [dg-process-target $selector]
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment