aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/lib/prune.exp
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-03-25 22:37:19 -0700
committerBen Cheng <bccheng@google.com>2014-03-25 22:37:19 -0700
commit1bc5aee63eb72b341f506ad058502cd0361f0d10 (patch)
treec607e8252f3405424ff15bc2d00aa38dadbb2518 /gcc-4.9/gcc/testsuite/lib/prune.exp
parent283a0bf58fcf333c58a2a92c3ebbc41fb9eb1fdb (diff)
downloadtoolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.gz
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.bz2
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.zip
Initial checkin of GCC 4.9.0 from trunk (r208799).
Change-Id: I48a3c08bb98542aa215912a75f03c0890e497dba
Diffstat (limited to 'gcc-4.9/gcc/testsuite/lib/prune.exp')
-rw-r--r--gcc-4.9/gcc/testsuite/lib/prune.exp79
1 files changed, 79 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/lib/prune.exp b/gcc-4.9/gcc/testsuite/lib/prune.exp
new file mode 100644
index 000000000..72ecde770
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/lib/prune.exp
@@ -0,0 +1,79 @@
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Prune messages from gcc that aren't useful.
+
+if ![info exists TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS ""
+}
+set TEST_ALWAYS_FLAGS "-fno-diagnostics-show-caret -fdiagnostics-color=never $TEST_ALWAYS_FLAGS"
+
+proc prune_gcc_output { text } {
+ #send_user "Before:$text\n"
+
+ regsub -all "(^|\n)(\[^\n\]*: )?In ((static member |lambda )?function|member|method|(copy )?constructor|destructor|instantiation|substitution|program|subroutine|block-data)\[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*(: )?At (top level|global scope):\[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*: (recursively )?required \[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*: . skipping \[0-9\]* instantiation contexts \[^\n\]*" $text "" text
+ regsub -all "(^|\n) inlined from \[^\n\]*" $text "" text
+ regsub -all "(^|\n)collect2: error: ld returned \[^\n\]*" $text "" text
+ regsub -all "(^|\n)collect: re(compiling|linking)\[^\n\]*" $text "" text
+ regsub -all "(^|\n)Please submit.*instructions\[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[0-9\]\[0-9\]* errors\." $text "" text
+ regsub -all "(^|\n)(In file included|\[ \]+from)\[^\n\]*" $text "" text
+
+ # Ignore informational notes.
+ regsub -all "(^|\n)\[^\n\]*: note: \[^\n\]*" $text "" text
+
+ # Ignore harmless -fpic warnings.
+ regsub -all "(^|\n)\[^\n\]*: warning: -f(pic|PIC) ignored for target\[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*: warning: -f(pic|PIC)( and -fpic are| is)? not supported\[^\n\]*" $text "" text
+
+ # Ignore errata warning from IA64 assembler.
+ regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text
+ regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text
+
+ # Ignore harmless VTA note.
+ regsub -all "(^|\n)\[^\n\]*: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without\[^\n\]*" $text "" text
+
+ # It would be nice to avoid passing anything to gcc that would cause it to
+ # issue these messages (since ignoring them seems like a hack on our part),
+ # but that's too difficult in the general case. For example, sometimes
+ # you need to use -B to point gcc at crt0.o, but there are some targets
+ # that don't have crt0.o.
+ regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $text "" text
+ regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text
+
+ # Ignore harmless warnings from Xcode 3.2.x.
+ regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol\[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*_bound\[^\n\]*FORM_ref4\[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*warning:\[^\n\]*TAG_variable: AT_location\[^\n\]*didn't have valid function low pc\[^\n\]*" $text "" text
+
+ # Ignore harmless warnings from Xcode 4.0.
+ regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text
+
+ #send_user "After:$text\n"
+
+ return $text
+}
+
+# Provide a definition of this if missing (delete after next dejagnu release).
+
+if { [info procs prune_warnings] == "" } then {
+ proc prune_warnings { text } {
+ return $text
+ }
+}