Message ID | yddpqttrwk0.fsf@manam.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
> I've finally gotten around to properly test my patch to make > dg-require-effective-target work with the gnat.dg testsuite. Unlike > any other language, the gnat_target_compile function only works with Ada > code, not invoking e.g. the C compiler for other input. Indeed, because gnatmake doesn't know how to handle C files. > 2010-11-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> > > * lib/gnat.exp: Load gcc.exp. > (gnat_target_compile): Use gcc_target_compile for *.c sources. > * gnat.dg/sse_nolib.adb: Use dg-require-effective-target sse_runtime. OK, thanks.
diff -r 736a64c64f6c gcc/testsuite/lib/gnat.exp --- a/gcc/testsuite/lib/gnat.exp Sun Nov 14 23:15:14 2010 +0100 +++ b/gcc/testsuite/lib/gnat.exp Sat Nov 20 11:17:15 2010 +0100 @@ -27,6 +27,7 @@ load_lib libgloss.exp load_lib prune.exp load_lib gcc-defs.exp +load_lib gcc.exp load_lib timeout.exp # @@ -132,6 +133,11 @@ global gnat_libgcc_s_path global gnat_target_current + # dg-require-effective-target tests must be compiled as C. + if [ string match "*.c" $source ] then { + return [gcc_target_compile $source $dest $type $options] + } + # If we detect a change of target, we need to recompute both # GNAT_UNDER_TEST and the appropriate RTS. if { $gnat_target_current!="[current_target_name]" } { diff -r 5fadddc44ec5 gcc/testsuite/gnat.dg/sse_nolib.adb --- a/gcc/testsuite/gnat.dg/sse_nolib.adb Tue Nov 23 12:22:55 2010 +0100 +++ b/gcc/testsuite/gnat.dg/sse_nolib.adb Thu Nov 25 21:07:38 2010 +0100 @@ -1,6 +1,6 @@ -- { dg-do run { target i?86-*-* x86_64-*-* } } -- { dg-options "-O1 -msse" } +-- { dg-require-effective-target sse_runtime } with Ada.Unchecked_Conversion; --