aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadbackward.c
diff options
context:
space:
mode:
authorJeff Law <jeffreyalaw@gmail.com>2021-10-29 11:30:15 -0400
committerJeff Law <jeffreyalaw@gmail.com>2021-10-29 11:30:15 -0400
commit14c7757e9b751781360737f53b71f851fc356d3d (patch)
tree0cbab5150d7ef8500a9cbef9cffdb17070694b9c /gcc/tree-ssa-threadbackward.c
parentcb596fd43667f92c4cb037a4ee8b2061c393ba60 (diff)
downloadgcc-14c7757e9b751781360737f53b71f851fc356d3d.zip
gcc-14c7757e9b751781360737f53b71f851fc356d3d.tar.gz
gcc-14c7757e9b751781360737f53b71f851fc356d3d.tar.bz2
Avoid overly-greedy match in dejagnu regexp.
Occasionally I've been seeing failures with the multi-line diagnostics. It's never been clear what's causing the spurious failures, though I have long suspected a greedy regexp match. It happened again yesterday with a local change that in no way should affect diagnostics, so I finally went searching and found that sure enough the multi-line diagnostics had a ".*" in their regexp. According to the comments, the .* is primarily to catch any dg directives that may appear -- ie it should eat to EOL, but not multiple lines. But a .* can indeed match a newline and cause it to eat multiple lines. The fix is simple. [^\r\n]* will eat to EOL, but not further. Regression tested on x86_64 and on our internal target. gcc/testsuite * lib/multiline.exp (_build_multiline_regex): Use a better regexp than .* to match up to EOL.
Diffstat (limited to 'gcc/tree-ssa-threadbackward.c')
0 files changed, 0 insertions, 0 deletions