From 16a2a458809103d1c382c09c62b09697aac9b935 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Mon, 7 Dec 2020 09:36:15 -0800 Subject: [PATCH] go-test.exp: don't quote already-quoted parentheses * go.test/go-test.exp (errchk): Don't backslash quote parentheses that are already backslash quoted. --- gcc/testsuite/go.test/go-test.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/go.test/go-test.exp b/gcc/testsuite/go.test/go-test.exp index 8f17cb3db71..d129e1c65da 100644 --- a/gcc/testsuite/go.test/go-test.exp +++ b/gcc/testsuite/go.test/go-test.exp @@ -131,11 +131,11 @@ proc errchk { test opts } { set index [string first "dg-error" $out_line] regsub -start $index -all "\(\[^\\\\]\)\}\(.\)" $out_line "\\1\\\\\[\\\}\\\\\]\\2" out_line } - if [string match "*dg-error*\(*" $out_line] { + if [string match "*dg-error*\\\[^\\\\\]\(*" $out_line] { set index [string first "dg-error" $out_line] regsub -start $index -all "\\\\\\\(" $out_line "\\\\\[\\\(\\\\\]" out_line } - if [string match "*dg-error*\)*\}" $out_line] { + if [string match "*dg-error*\\\[^\\\\\]\)*\}" $out_line] { set index [string first "dg-error" $out_line] regsub -start $index -all "\\\\\\\)\(.\)" $out_line "\\\\\[\\\)\\\\\]\\1" out_line } -- 2.30.2