1 # Copyright (C) 1997, 2002, 2003, 2007, 2008, 2010
2 # Free Software Foundation, Inc.
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.
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.
14 # You should have received a copy of the GNU General Public License
15 # along with GCC; see the file COPYING3. If not see
16 # <http://www.gnu.org/licenses/>.
18 # GCC testsuite for precompiled header interaction,
19 # that uses the `dg.exp' driver.
24 load_lib torture-options.exp
31 set-torture-options $DG_TORTURE_OPTIONS
33 set old_dg_do_what_default "${dg-do-what-default}"
35 global torture_without_loops
36 set mytorture [concat [list {-O0 -g}] $torture_without_loops]
39 foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.m]] {
41 # We don't try to use the loop-optimizing options, since they are highly
42 # unlikely to make any difference to PCH. However, we do want to
43 # add -O0 -g, since users who want PCH usually want debugging and quick
45 dg-flags-pch $subdir $test "-fgnu-runtime" $mytorture ".h"
48 if [istarget "*-*-darwin*" ] {
49 foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.m]] {
50 global torture_without_loops
52 # We don't try to use the loop-optimizing options, since they are highly
53 # unlikely to make any difference to PCH. However, we do want to
54 # add -O0 -g, since users who want PCH usually want debugging and quick
56 dg-flags-pch $subdir $test "-fnext-runtime" $mytorture ".h"
60 set dg-do-what-default "$old_dg_do_what_default"