2005-11-22 21:35:51 +01:00
|
|
|
global MUDFLAP_FLAGS
|
|
|
|
set MUDFLAP_FLAGS [list {} {-static} {-O2} {-O3}]
|
2004-07-09 21:51:51 +02:00
|
|
|
|
|
|
|
libmudflap-init c++
|
2005-06-14 20:37:20 +02:00
|
|
|
if {$cxx == "g++"} then {
|
|
|
|
unsupported "g++ not found"
|
|
|
|
return
|
|
|
|
}
|
2004-07-09 21:51:51 +02:00
|
|
|
|
|
|
|
dg-init
|
|
|
|
|
|
|
|
global srcdir subdir
|
|
|
|
|
2005-11-22 21:35:51 +01:00
|
|
|
foreach flags $MUDFLAP_FLAGS {
|
2004-07-09 21:51:51 +02:00
|
|
|
set l1 [libmudflap_target_compile "$srcdir/$subdir/ctors-1.cxx" "ctors-1.o" object {additional_flags=-fmudflap}]
|
|
|
|
set test "ctors-1 compilation ${flags}"
|
configure.ac: Check for more headers, functions.
2004-10-12 Frank Ch. Eigler <fche@redhat.com>
* configure.ac: Check for more headers, functions.
* mf-hooks2.c (mkbuffer, unmkbuffer): New helper functions for
tracking overridden FILE buffers.
(fopen, setvbuf): New/revised hook functions for buffer overriding.
(setbuf,setlinebuf,fdopen,freopen,fopen64,freopen64,fclose): Ditto.
(fflush): Accept given NULL stream (means "all streams").
* mf-runtime.h.in:
* mf-runtime.c (__mfu_check): Accept accesses that span adjacent
HEAP/GUESS objects.
(LOOKUP_CACHE_SIZE_MAX): Raise to 64K entries tentatively.
(__mf_adapt_cache): Use them all.
* testsuite/libmudflap.c/pass35-frag.c: Update warning message.
* testsuite/libmudflap.c++/ctors.exp: Ditto.
* testsuite/libmudflap.c/{pass51,pass52}-frag.c: New tests.
* configure, config.h.in: Regenerated.
From-SVN: r88996
2004-10-13 20:27:16 +02:00
|
|
|
if [string match "*mudflap cannot track unknown size extern *k*" $l1] { pass $test } { fail $test }
|
2004-07-09 21:51:51 +02:00
|
|
|
|
|
|
|
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
|