OSDN Git Service

43695f01b1c00eb11eb404f2d499ad09cdc36219
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / testsuite / lib / dg-options.exp
1 # Handlers for additional dg-xxx keywords in tests.
2
3 # Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
4 # Free Software Foundation, Inc.
5 #
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
10
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
15
16 # You should have received a copy of the GNU General Public License
17 # along with this program; see the file COPYING3.  If not see
18 # <http://www.gnu.org/licenses/>.
19
20 proc dg-require-c-std { args } {
21     if { ![ check_v3_target_c_std ] } {
22         upvar dg-do-what dg-do-what
23         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
24         return
25     }
26     return
27 }
28
29 proc dg-require-debug-mode { args } {
30     if { ![ check_v3_target_debug_mode ] } {
31         upvar dg-do-what dg-do-what
32         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
33         return
34     }
35     return
36 }
37
38 proc dg-require-profile-mode { args } {
39     if { ![ check_v3_target_profile_mode ] } {
40         upvar dg-do-what dg-do-what
41         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
42         return
43     }
44     return
45 }
46
47 proc dg-require-normal-mode { args } {
48     if { ![ check_v3_target_normal_mode ] } {
49         upvar dg-do-what dg-do-what
50         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
51         return
52     }
53     return
54 }
55
56 proc dg-require-parallel-mode { args } {
57     if { ![ check_v3_target_parallel_mode ] } {
58         upvar dg-do-what dg-do-what
59         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
60         return
61     }
62     return
63 }
64
65 proc dg-require-fileio { args } {
66     if { ![ check_v3_target_fileio ] } {
67         upvar dg-do-what dg-do-what
68         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
69         return
70     }
71     return
72 }
73
74 proc dg-require-namedlocale { args } {
75     if { ![ check_v3_target_namedlocale [lindex $args 1] ] } {
76         upvar dg-do-what dg-do-what
77         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
78         return
79     }
80     return
81 }
82
83 proc dg-require-sharedlib { args } {
84     if { ![ check_v3_target_sharedlib ] } {
85         upvar dg-do-what dg-do-what
86         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
87         return
88     }
89     return
90 }
91
92 proc dg-require-time { args } {
93     if { ![ check_v3_target_time ] } {
94         upvar dg-do-what dg-do-what
95         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
96         return
97     }
98     return
99 }
100
101 proc dg-require-cstdint { args } {
102     if { ![ check_v3_target_cstdint ] } {
103         upvar dg-do-what dg-do-what
104         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
105         return
106     }
107     return
108 }
109
110 proc dg-require-cmath { args } {
111     if { ![ check_v3_target_cmath ] } {
112         upvar dg-do-what dg-do-what
113         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
114         return
115     }
116     return
117 }
118
119 proc dg-require-atomic-builtins { args } {
120     if { ![ check_v3_target_atomic_builtins ] } {
121         upvar dg-do-what dg-do-what
122         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
123         return
124     }
125     return
126 }
127
128 proc dg-require-gthreads { args } {
129     if { ![ check_v3_target_gthreads ] } {
130         upvar dg-do-what dg-do-what
131         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
132         return
133     }
134     return
135 }
136
137 proc dg-require-nanosleep { args } {
138     if { ![ check_v3_target_nanosleep ] } {
139         upvar dg-do-what dg-do-what
140         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
141         return
142     }
143     return
144 }
145
146 proc dg-require-sched-yield { args } {
147     if { ![ check_v3_target_sched_yield ] } {
148         upvar dg-do-what dg-do-what
149         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
150         return
151     }
152     return
153 }
154
155 proc dg-require-string-conversions { args } {
156     if { ![ check_v3_target_string_conversions ] } {
157         upvar dg-do-what dg-do-what
158         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
159         return
160     }
161     return
162 }
163
164 proc dg-require-swprintf { args } {
165     if { ![ check_v3_target_swprintf ] } {
166         upvar dg-do-what dg-do-what
167         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
168         return
169     }
170     return
171 }
172
173 proc dg-require-binary-io { args } {
174     if { ![ check_v3_target_binary_io ] } {
175         upvar dg-do-what dg-do-what
176         set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
177         return
178     }
179     return
180 }
181
182 proc add_options_for_no_pch { flags } {
183     # This forces any generated and possibly included PCH to be invalid.
184     return "-D__GLIBCXX__=99999999"
185 }