OpenCores
URL https://opencores.org/ocsvn/scarts/scarts/trunk

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [libmudflap/] [testsuite/] [libmudflap.c++/] [ctors.exp] - Blame information for rev 14

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 14 jlechner
 
2
libmudflap-init c++
3
if {$cxx == "g++"} then {
4
    unsupported "g++ not found"
5
    return
6
}
7
 
8
dg-init
9
 
10
global srcdir subdir
11
 
12
foreach flags [list {} {-static} {-O2} {-O3}] {
13
    set l1 [libmudflap_target_compile "$srcdir/$subdir/ctors-1.cxx" "ctors-1.o" object {additional_flags=-fmudflap}]
14
    set test "ctors-1 compilation ${flags}"
15
    if [string match "*mudflap cannot track unknown size extern *k*" $l1] { pass $test } { fail $test }
16
 
17
    set l2 [libmudflap_target_compile "$srcdir/$subdir/ctors-2.cxx" "ctors-2.o" object {additional_flags=-fmudflap}]
18
    set test "ctors-2 compilation ${flags}"
19
    if [string match "" $l2]  { pass $test } { fail $test }
20
 
21
    set l3 [libmudflap_target_compile "ctors-1.o ctors-2.o" "ctors-12.exe" executable {additional_flags=-fmudflap additional_flags=-lmudflap additional_flags=-lstdc++}]
22
    set test "ctors-12 linkage ${flags}"
23
    if [string match "" $l3]  { pass $test } { fail $test }
24
 
25
    set l4 [libmudflap_target_compile "ctors-2.o ctors-1.o" "ctors-21.exe" executable {additional_flags=-fmudflap additional_flags=-lmudflap additional_flags=-lstdc++}]
26
    set test "ctors-21 linkage ${flags}"
27
    if [string match "" $l3]  { pass $test } { fail $test }
28
 
29
    setenv MUDFLAP_OPTIONS "-viol-segv"
30
 
31
    remote_spawn host "./ctors-12.exe"
32
    set l5 [remote_wait host 10]
33
    set test "ctors-12 execution ${flags}"
34
    if {[lindex $l5 0] == 0}  { pass $test } { fail $test }
35
 
36
    remote_spawn host "./ctors-21.exe"
37
    set l6 [remote_wait host 10]
38
    set test "ctors-21 execution ${flags}"
39
    if {[lindex $l6 0] == 0}  { pass $test } { fail $test }
40
 
41
    foreach f [glob -nocomplain "ctors-*"] {
42
       remote_file build delete $f
43
    }
44
}
45
 
46
dg-finish

powered by: WebSVN 2.1.0

© copyright 1999-2025 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.