initp1.C: Moved here from g++.old-deja/g++.ext.
[official-gcc.git] / gcc / testsuite / g++.dg / special / ecos.exp
blobdf94956c19edd0b19607a64e88879aa890c02c2d
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.
7 #
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.
24 # Load support procs.
25 load_lib g++-dg.exp
27 ###########
28 # conpr-1.C
29 ###########
31 dg-init
32 set lines [g++_target_compile "$srcdir/$subdir/conpr-1.C" "$objdir/a.out" executable ""]
33 if [string match "*init_priority*" $lines] then {
34 xfail "conpr-1.C"
35 file delete $objdir/a.out
36 } elseif ![string match "" $lines] then {
37 fail "conpr-1.C"
38 } else {
39 dg-runtest "$srcdir/$subdir/conpr-1.C" "" ""
40 file delete $objdir/a.out
42 dg-finish
45 ###########
46 # conpr-2.C
47 ###########
49 dg-init
51 set lines [g++_target_compile "$srcdir/$subdir/conpr-2a.C" "conpr-2a.o" object ""]
52 if [string match "*init_priority*" $lines] then {
53 xfail "conpr-2a.o"
54 } elseif ![string match "" $lines] then {
55 fail "conpr-2a.o"
56 } else {
57 dg-runtest "$srcdir/$subdir/conpr-2.C" "conpr-2a.o" ""
58 file delete conpr-2a.o
60 dg-finish
63 ###########
64 # conpr-3.C
65 ###########
67 dg-init
69 set lines [g++_target_compile "$srcdir/$subdir/conpr-3a.C" "conpr-3a.o" object ""]
70 if [string match "*init_priority*" $lines] then {
71 xfail "conpr-3a.o"
72 } elseif ![string match "" $lines] then {
73 fail "conpr-3a.o"
74 } else {
75 set lines [g++_target_compile "$srcdir/$subdir/conpr-3b.C" "conpr-3b.o" object ""]
76 if ![string match "" $lines] then {
77 fail "conpr-3b.o"
78 } else {
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
85 dg-finish
87 ###########
88 # initp1.C
89 ###########
91 dg-init
92 set lines [g++_target_compile "$srcdir/$subdir/initp1.C" "$objdir/a.out" executable ""]
93 if [string match "*init_priority*" $lines] then {
94 xfail "initp1.C"
95 file delete $objdir/a.out
96 } elseif ![string match "" $lines] then {
97 fail "initp1.C"
98 } else {
99 dg-runtest "$srcdir/$subdir/conpr-1.C" "" ""
100 file delete $objdir/a.out
102 dg-finish
105 ### EOF ecos.exp