]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/lib/prune.exp
* collect2.c: Include diagnostic.h.
[thirdparty/gcc.git] / gcc / testsuite / lib / prune.exp
CommitLineData
11091b4d 1# Copyright (C) 1997, 1999, 2000, 2002, 2004, 2007, 2008, 2010, 2011
f63ff66b 2# Free Software Foundation, Inc.
1b28399f 3
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
f63ff66b 6# the Free Software Foundation; either version 3 of the License, or
1b28399f 7# (at your option) any later version.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
f63ff66b 15# along with GCC; see the file COPYING3. If not see
16# <http://www.gnu.org/licenses/>.
1b28399f 17
18# Prune messages from gcc that aren't useful.
19
20proc prune_gcc_output { text } {
21 #send_user "Before:$text\n"
22
a8b75081 23 regsub -all "(^|\n)(\[^\n\]*: )?In ((static member |lambda )?function|member|method|(copy )?constructor|destructor|instantiation|program|subroutine|block-data)\[^\n\]*" $text "" text
ddb48b82 24 regsub -all "(^|\n)\[^\n\]*(: )?At (top level|global scope):\[^\n\]*" $text "" text
fa494501 25 regsub -all "(^|\n)\[^\n\]*: (recursively )?instantiated from \[^\n\]*" $text "" text
7a00f939 26 regsub -all "(^|\n)\[^\n\]*: . skipping \[0-9\]* instantiation contexts \[^\n\]*" $text "" text
b8c23db3 27 regsub -all "(^|\n) inlined from \[^\n\]*" $text "" text
11091b4d 28 regsub -all "(^|\n)collect2: error: ld returned \[^\n\]*" $text "" text
a278084f 29 regsub -all "(^|\n)collect: re(compiling|linking)\[^\n\]*" $text "" text
8b036ce1 30 regsub -all "(^|\n)Please submit.*instructions\[^\n\]*" $text "" text
a278084f 31 regsub -all "(^|\n)\[0-9\]\[0-9\]* errors\." $text "" text
1b28399f 32
a5606429 33 # Ignore harmless -fpic warnings.
c4979190 34 regsub -all "(^|\n)\[^\n\]*: warning: -f(pic|PIC) ignored for target\[^\n\]*" $text "" text
a5606429 35 regsub -all "(^|\n)\[^\n\]*: warning: -f(pic|PIC)( and -fpic are| is)? not supported\[^\n\]*" $text "" text
c4979190 36
9994489f 37 # Ignore errata warning from IA64 assembler.
38 regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text
39 regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text
40
86adc9ff 41 # Ignore second line of IRIX 6 linker multiline message.
42 regsub -all "(^|\n)\[ \t\]*that might degrade performance on an older version \\(rev. 2.2\\) R4000 processor.\[^\n\]*" $text "" text
43
76f4ab1c 44 # Ignore harmless VTA note.
45 regsub -all "(^|\n)\[^\n\]*: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without\[^\n\]*" $text "" text
46
1b28399f 47 # It would be nice to avoid passing anything to gcc that would cause it to
48 # issue these messages (since ignoring them seems like a hack on our part),
49 # but that's too difficult in the general case. For example, sometimes
50 # you need to use -B to point gcc at crt0.o, but there are some targets
51 # that don't have crt0.o.
52 regsub -all "(^|\n)\[^\n\]*file path prefix \[^\n\]* never used" $text "" text
53 regsub -all "(^|\n)\[^\n\]*linker input file unused since linking not done" $text "" text
54
a324d015 55 # Ignore harmless warnings from Xcode 3.2.x.
56 regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol\[^\n\]*" $text "" text
2afcb22d 57 regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*_bound\[^\n\]*FORM_ref4\[^\n\]*" $text "" text
58 regsub -all "(^|\n)\[^\n\]*warning:\[^\n\]*TAG_variable: AT_location\[^\n\]*didn't have valid function low pc\[^\n\]*" $text "" text
61ff902c 59
60 # Ignore harmless warnings from Xcode 4.0.
61 regsub -all "(^|\n)\[^\n\]*ld: warning: could not create compact unwind for\[^\n\]*" $text "" text
62
1b28399f 63 #send_user "After:$text\n"
64
65 return $text
66}
67
68# Provide a definition of this if missing (delete after next dejagnu release).
69
70if { [info procs prune_warnings] == "" } then {
71 proc prune_warnings { text } {
72 return $text
73 }
74}