OSDN Git Service

dsymutil enabled for Fortran.
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / testsuite / lib / prune.exp
1 #   Copyright (C) 1997, 1999, 2000, 2001, 2004, 2009
2 #   Free Software Foundation, Inc.
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
6 # the Free Software Foundation; either version 3 of the License, or
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
15 # along with this program; see the file COPYING3.  If not see
16 # <http://www.gnu.org/licenses/>.
17
18 # Prune messages from g++ that aren't useful.
19
20 # Prune any messages matching ARGS[1] (a regexp) from test output.
21 proc dg-prune-output { args } {
22     global additional_prunes
23
24     if { [llength $args] != 2 } {
25         error "[lindex $args 1]: need one argument"
26         return
27     }
28
29     lappend additional_prunes [lindex $args 1]
30 }
31
32 proc libstdc++-dg-prune { system text } {
33     global additional_prunes
34
35     # Cygwin warns about -ffunction-sections
36     regsub -all "(^|\n)\[^\n\]*: -ffunction-sections may affect debugging on some targets\[^\n\]*" $text "" text
37
38     # Remove parts of warnings that refer to location of previous
39     # definitions, etc as these confuse dejagnu
40     regsub -all "(^|\n)(\[^\n\]*: )?In ((static member |lambda )?function|member|method|(copy )?constructor|destructor|instantiation|program|subroutine|block-data)\[^\n\]*" $text "" text
41     regsub -all "(^|\n)\[^\n\]*(: )?At (top level|global scope):\[^\n\]*" $text "" text
42     regsub -all "(^|\n)\[^\n\]*:   (recursively )?instantiated from \[^\n\]*" $text "" text
43     regsub -all "(^|\n)\[^\n\]*:   . skipping \[0-9\]* instantiation contexts \[^\n\]*" $text "" text
44     regsub -all "(^|\n)    inlined from \[^\n\]*" $text "" text
45     # Why doesn't GCC need these to strip header context?
46     regsub -all "(^|\n)In file included from \[^\n\]*" $text "" text
47     regsub -all "(^|\n)\[ \t\]*from \[^\n\]*" $text "" text
48
49     # Ignore errata warning from IA64 assembler.
50     regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text
51     regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text
52
53     # Ignore harmless warnings from Xcode 3.2.x.
54     regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol\[^\n\]*" $text "" text
55     regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*_bound\[^\n\]*FORM_ref4\[^\n\]*" $text "" text
56     regsub -all "(^|\n)\[^\n\]*warning:\[^\n\]*TAG_variable:  AT_location\[^\n\]*didn't have valid function low pc\[^\n\]*" $text "" text
57
58     foreach p $additional_prunes {
59         if { [string length $p] > 0 } {
60             # Following regexp matches a complete line containing $p.
61             regsub -all "(^|\n)\[^\n\]*$p\[^\n\]*" $text "" text
62         }
63     }
64
65     return $text
66 }