Skip to content

Commit

Permalink
Fix g++.old-deja/g++.pt/const2.C on Solaris
Browse files Browse the repository at this point in the history
	* lib/gcc-dg.exp (process-message): Avoid additional whitespace in
	$expmsg.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@255580 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
ro committed Dec 12, 2017
1 parent 56adbb2 commit 9de168c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions gcc/testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2017-12-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>

* lib/gcc-dg.exp (process-message): Avoid additional whitespace in
$expmsg.

2017-12-12 Richard Biener <rguenther@suse.de>

PR tree-optimization/83385
Expand Down
5 changes: 3 additions & 2 deletions gcc/testsuite/lib/gcc-dg.exp
Original file line number Diff line number Diff line change
Expand Up @@ -1103,14 +1103,15 @@ proc process-message { msgproc msgprefix dgargs } {
# Remove it from the original expression and move it
# to the proper place in the search expression.
set expmsg [string range $expmsg [string length $column] end]
set column "$column "
} elseif [string match "" [lindex $newentry 0]] {
# The specified line number is 0; don't expect a column number.
} else {
# There is no column number in the search expression, but we
# should expect one in the message itself.
set column {[0-9]+:}
set column {[0-9]+: }
}
set expmsg "$column $msgprefix\[^\n\]*$expmsg"
set expmsg "$column$msgprefix\[^\n\]*$expmsg"
set newentry [lreplace $newentry 2 2 $expmsg]

set dg-messages [lreplace ${dg-messages} end end $newentry]
Expand Down

0 comments on commit 9de168c

Please sign in to comment.