aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/special/ecos.exp
blob: 5b560581e75e204631078087c2359da6271c5bc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Copyright (C) 1999, 2001 Free Software Foundation, Inc.

# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 

# Please email any bugs, comments, and/or additions to this file to:
# jlarmour@cygnus.co.uk

# This file was written by Jonathan Larmour (jlarmour@cygnus.co.uk).

# G++ testsuite that uses the `dg.exp' driver.

# Load support procs.
load_lib g++-dg.exp

###########
# conpr-1.C
###########

dg-init
set lines [g++_target_compile "$srcdir/$subdir/conpr-1.C" "$objdir/conpr-1.exe" executable ""]
if [string match "*init_priority*" $lines] then {
    xfail "conpr-1.C"
    file delete $objdir/conpr-1.exe
} elseif ![string match "" $lines] then {
    fail "conpr-1.C"
} else {
    dg-runtest "$srcdir/$subdir/conpr-1.C" "" "" 
    file delete $objdir/conpr-1.exe
}
dg-finish


###########
# conpr-2.C
###########

dg-init

set lines [g++_target_compile "$srcdir/$subdir/conpr-2a.C" "conpr-2a.o" object ""]
if [string match "*init_priority*" $lines] then {
    xfail "conpr-2a.o"
} elseif ![string match "" $lines] then {
    fail "conpr-2a.o"
} else {
    dg-runtest "$srcdir/$subdir/conpr-2.C" "conpr-2a.o" "" 
    file delete conpr-2a.o
}
dg-finish


###########
# conpr-3.C
###########

dg-init

set lines [g++_target_compile "$srcdir/$subdir/conpr-3a.C" "conpr-3a.o" object ""]
if [string match "*init_priority*" $lines] then {
    xfail "conpr-3a.o"
} elseif ![string match "" $lines] then {
    fail "conpr-3a.o"
} else {
    set lines [g++_target_compile "$srcdir/$subdir/conpr-3b.C" "conpr-3b.o" object ""]
    if ![string match "" $lines] then {
        fail "conpr-3b.o"
    } else {
        # run it with objects both ways around!
        dg-runtest "$srcdir/$subdir/conpr-3.C" "conpr-3a.o conpr-3b.o" ""
        dg-runtest "$srcdir/$subdir/conpr-3.C" "conpr-3b.o conpr-3a.o" ""
        file delete conpr-3a.o conpr-3b.o
    }
}
dg-finish

###########
# initp1.C
###########

dg-init
set lines [g++_target_compile "$srcdir/$subdir/initp1.C" "$objdir/initp1.exe" executable ""]
if [string match "*init_priority*" $lines] then {
    xfail "initp1.C"
    file delete $objdir/initp1.exe
} elseif ![string match "" $lines] then {
    fail "initp1.C"
} else {
    dg-runtest "$srcdir/$subdir/initp1.C" "" ""
    file delete $objdir/initp1.exe
}
dg-finish


### EOF ecos.exp