1 # Copyright
(C
) 1999, 2001 Free Software Foundation
, Inc.
3 # This
program is free software
; you can redistribute it and
/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation
; either version
2 of the License
, or
6 #
(at your option
) any later version.
8 # This
program is distributed in the hope that it will be useful
,
9 # but WITHOUT
ANY WARRANTY
; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License
for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this
program; if not
, write to the Free Software
15 # Foundation
, Inc.
, 59 Temple Place
- Suite
330, Boston
, MA
02111-1307, USA.
17 # Please email
any bugs
, comments
, and
/or additions to this file to
:
18 # jlarmour@cygnus.co.uk
20 # This file was written by Jonathan Larmour
(jlarmour@cygnus.co.uk
).
22 # G
++ testsuite that uses the `dg.exp
' driver.
32 set lines [g++_target_compile "$srcdir/$subdir/conpr-1.C" "$objdir/a.out" executable ""]
33 if [string match "*init_priority*" $lines] then {
35 file delete $objdir/a.out
36 } elseif ![string match "" $lines] then {
39 dg-runtest "$srcdir/$subdir/conpr-1.C" "" ""
40 file delete $objdir/a.out
51 set lines [g++_target_compile "$srcdir/$subdir/conpr-2a.C" "conpr-2a.o" object ""]
52 if [string match "*init_priority*" $lines] then {
54 } elseif ![string match "" $lines] then {
57 dg-runtest "$srcdir/$subdir/conpr-2.C" "conpr-2a.o" ""
58 file delete conpr-2a.o
69 set lines [g++_target_compile "$srcdir/$subdir/conpr-3a.C" "conpr-3a.o" object ""]
70 if [string match "*init_priority*" $lines] then {
72 } elseif ![string match "" $lines] then {
75 set lines [g++_target_compile "$srcdir/$subdir/conpr-3b.C" "conpr-3b.o" object ""]
76 if ![string match "" $lines] then {
79 # run it with objects both ways around!
80 dg-runtest "$srcdir/$subdir/conpr-3.C" "conpr-3a.o conpr-3b.o" ""
81 dg-runtest "$srcdir/$subdir/conpr-3.C" "conpr-3b.o conpr-3a.o" ""
82 file delete conpr-3a.o conpr-3b.o
92 set lines [g++_target_compile "$srcdir/$subdir/initp1.C" "$objdir/a.out" executable ""]
93 if [string match "*init_priority*" $lines] then {
95 file delete $objdir/a.out
96 } elseif ![string match "" $lines] then {
99 dg-runtest "$srcdir/$subdir/conpr-1.C" "" ""
100 file delete $objdir/a.out