diff options
author | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
---|---|---|
committer | upstream source tree <ports@midipix.org> | 2015-03-15 20:14:05 -0400 |
commit | 554fd8c5195424bdbcabf5de30fdc183aba391bd (patch) | |
tree | 976dc5ab7fddf506dadce60ae936f43f58787092 /libmudflap/testsuite/libmudflap.c++/ctors.exp | |
download | cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2 cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz |
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig;
imported gcc-4.6.4 source tree from verified upstream tarball.
downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.
if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
Diffstat (limited to 'libmudflap/testsuite/libmudflap.c++/ctors.exp')
-rw-r--r-- | libmudflap/testsuite/libmudflap.c++/ctors.exp | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/libmudflap/testsuite/libmudflap.c++/ctors.exp b/libmudflap/testsuite/libmudflap.c++/ctors.exp new file mode 100644 index 000000000..b3dda8fd6 --- /dev/null +++ b/libmudflap/testsuite/libmudflap.c++/ctors.exp @@ -0,0 +1,48 @@ +global MUDFLAP_FLAGS +set MUDFLAP_FLAGS [list {} {-static} {-O2} {-O3}] + +libmudflap-init c++ +if {$cxx == "g++"} then { + unsupported "g++ not found" + return +} + +dg-init + +global srcdir subdir + +foreach flags $MUDFLAP_FLAGS { + set l1 [libmudflap_target_compile "$srcdir/$subdir/ctors-1.cxx" "ctors-1.o" object {additional_flags=-fmudflap}] + set test "ctors-1 compilation ${flags}" + if [string match "*mudflap cannot track unknown size extern *k*" $l1] { pass $test } { fail $test } + + set l2 [libmudflap_target_compile "$srcdir/$subdir/ctors-2.cxx" "ctors-2.o" object {additional_flags=-fmudflap}] + set test "ctors-2 compilation ${flags}" + if [string match "" $l2] { pass $test } { fail $test } + + set l3 [libmudflap_target_compile "ctors-1.o ctors-2.o" "ctors-12.exe" executable {additional_flags=-fmudflap additional_flags=-lmudflap additional_flags=-lstdc++}] + set test "ctors-12 linkage ${flags}" + if [string match "" $l3] { pass $test } { fail $test } + + set l4 [libmudflap_target_compile "ctors-2.o ctors-1.o" "ctors-21.exe" executable {additional_flags=-fmudflap additional_flags=-lmudflap additional_flags=-lstdc++}] + set test "ctors-21 linkage ${flags}" + if [string match "" $l3] { pass $test } { fail $test } + + setenv MUDFLAP_OPTIONS "-viol-segv" + + remote_spawn host "./ctors-12.exe" + set l5 [remote_wait host 10] + set test "ctors-12 execution ${flags}" + if {[lindex $l5 0] == 0} { pass $test } { fail $test } + + remote_spawn host "./ctors-21.exe" + set l6 [remote_wait host 10] + set test "ctors-21 execution ${flags}" + if {[lindex $l6 0] == 0} { pass $test } { fail $test } + + foreach f [glob -nocomplain "ctors-*"] { + remote_file build delete $f + } +} + +dg-finish |