OSDN Git Service

* g++.dg/special/ecos.exp (initp1.C): Run initp1.C test.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / special / ecos.exp
1 # Copyright (C) 1999, 2001 Free Software Foundation, Inc.
2
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.
12
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. 
16
17 # Please email any bugs, comments, and/or additions to this file to:
18 # jlarmour@cygnus.co.uk
19
20 # This file was written by Jonathan Larmour (jlarmour@cygnus.co.uk).
21
22 # G++ testsuite that uses the `dg.exp' driver.
23
24 # Load support procs.
25 load_lib g++-dg.exp
26
27 ###########
28 # conpr-1.C
29 ###########
30
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
41 }
42 dg-finish
43
44
45 ###########
46 # conpr-2.C
47 ###########
48
49 dg-init
50
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
59 }
60 dg-finish
61
62
63 ###########
64 # conpr-3.C
65 ###########
66
67 dg-init
68
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
83     }
84 }
85 dg-finish
86
87 ###########
88 # initp1.C
89 ###########
90
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/initp1.C" "" ""
100     file delete $objdir/a.out
101 }
102 dg-finish
103
104
105 ### EOF ecos.exp