diff options
author | Anthony Green <green@moxielogic.com> | 2020-06-07 14:31:06 -0400 |
---|---|---|
committer | Anthony Green <green@moxielogic.com> | 2020-06-07 14:31:06 -0400 |
commit | 2e90bb5577ea1fe3bc1716954e790999bc3549f7 (patch) | |
tree | 53e00fb1f66903d55de4b22c1880708cd5e8b171 /testsuite/lib | |
parent | 5e6ca054148dfb4d78e6f79457d48b745f919def (diff) | |
download | libffi-2e90bb5577ea1fe3bc1716954e790999bc3549f7.tar.gz |
Add gcc bug tests back
Diffstat (limited to 'testsuite/lib')
-rw-r--r-- | testsuite/lib/libffi.exp | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/testsuite/lib/libffi.exp b/testsuite/lib/libffi.exp index c02adf9..d3c17db 100644 --- a/testsuite/lib/libffi.exp +++ b/testsuite/lib/libffi.exp @@ -24,6 +24,11 @@ load_lib libgloss.exp load_gcc_lib target-libpath.exp load_gcc_lib wrapper.exp +proc check_effective_target_gccbug { } { + global has_gccbug + return $has_gccbug +} + # Return 1 if the target matches the effective target 'arg', 0 otherwise. # This can be used with any check_* proc that takes no argument and # returns only 1 or 0. It could be used with check_* procs that take @@ -477,6 +482,7 @@ proc libffi-dg-runtest { testcases default-extra-flags } { proc run-many-tests { testcases extra_flags } { global compiler_vendor + global has_gccbug global env switch $compiler_vendor { "clang" { @@ -538,8 +544,22 @@ proc run-many-tests { testcases extra_flags } { foreach opt $optimizations { foreach abi $abis { set options [concat $common $opt $abi] - verbose "Testing $testname, $options" 1 - dg-test $test $options "" + set has_gccbug false; + if { [string match $compiler_vendor "gnu"] \ + && [string match "*MSABI*" $abi] \ + && ( ( [string match "*DGTEST=57 *" $common] \ + && [string match "*call.c*" $testname] ) \ + || ( [string match "*DGTEST=54 *" $common] \ + && [string match "*callback*" $testname] ) \ + || [string match "*DGTEST=55 *" $common] \ + || [string match "*DGTEST=56 *" $common] ) } then { + if [libffi_feature_test "#if (__GNUC__ < 9) || ((__GNUC__ == 9) && (__GNUC_MINOR__ < 3))"] { + set has_gccbug true; + } + } + verbose "Testing $testname, $options" 1 + verbose "has_gccbug = $has_gccbug" 1 + dg-test $test $options "" } } } |