Commit 4feb5dd8 by Marek Polacek Committed by Marek Polacek

gcc-dg.exp (${tool}_load): Call prune_file_path instead of prune_gcc_output.

	* lib/gcc-dg.exp (${tool}_load): Call prune_file_path instead
	of prune_gcc_output.
	* lib/prune.exp (prune_file_path): New procedure.

From-SVN: r217428
parent 2f68e8bc
2014-11-12 Marek Polacek <polacek@redhat.com> 2014-11-12 Marek Polacek <polacek@redhat.com>
* lib/gcc-dg.exp (${tool}_load): Call prune_file_path instead
of prune_gcc_output.
* lib/prune.exp (prune_file_path): New procedure.
2014-11-12 Marek Polacek <polacek@redhat.com>
* c-c++-common/ubsan/overflow-sub-4.c: New test. * c-c++-common/ubsan/overflow-sub-4.c: New test.
* c-c++-common/ubsan/overflow-sub-2.c: Adjust dg-output. * c-c++-common/ubsan/overflow-sub-2.c: Adjust dg-output.
* c-c++-common/ubsan/overflow-int128.c: Likewise. * c-c++-common/ubsan/overflow-int128.c: Likewise.
......
...@@ -282,7 +282,7 @@ if { [info procs ${tool}_load] != [list] \ ...@@ -282,7 +282,7 @@ if { [info procs ${tool}_load] != [list] \
set result [list $status [lindex $result 1]] set result [list $status [lindex $result 1]]
} }
set result [list [lindex $result 0] [prune_gcc_output [lindex $result 1]]] set result [list [lindex $result 0] [prune_file_path [lindex $result 1]]]
return $result return $result
} }
} }
......
...@@ -68,13 +68,19 @@ proc prune_gcc_output { text } { ...@@ -68,13 +68,19 @@ proc prune_gcc_output { text } {
# Ignore harmless warnings from Xcode 4.0. # Ignore harmless warnings from Xcode 4.0.
regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text
#send_user "After:$text\n"
return $text
}
proc prune_file_path { text } {
global srcdir
# Truncate absolute file path into relative path. # Truncate absolute file path into relative path.
set topdir "[file dirname [file dirname [file dirname $srcdir]]]" set topdir "[file dirname [file dirname [file dirname $srcdir]]]"
regsub -all "$srcdir\/" $text "" text regsub -all "$srcdir\/" $text "" text
regsub -all "$topdir\/" $text "" text regsub -all "$topdir\/" $text "" text
#send_user "After:$text\n"
return $text return $text
} }
......
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