[PATCH,testsuite] fix gcc.dg/vect/vect-{82,83}.c
Nathan Froyd
froydnj@codesourcery.com
Wed Mar 11 19:40:00 GMT 2009
vect.exp has this bit of code in it for powerpc targets:
lappend DEFAULT_VECTCFLAGS "-maltivec"
if [check_vmx_hw_available] {
set dg-do-what-default run
} else {
if [is-effective-target ilp32] {
# Specify a cpu that supports VMX for compile-only tests.
lappend DEFAULT_VECTCFLAGS "-mcpu=970"
}
set dg-do-what-default compile
}
On 32-bit targets that don't have VMX hardware, we'll compile with
-mcpu=970, which frees up the compiler to use 64-bit instructions where
appropriate. vect-{82,83}.c, however, are specified to be runnable
testcases. They also use 'long long unsigned int' variables, which get
stored into via 'std' instructions, since we're compiling for a 64-bit
CPU.
These instructions would normally throw SIGILL and cause the testcase to
exit cleanly...except on bare-metal targets, signal handlers don't work
so well. This causes spurious execution failures.
The solution is to remove the `dg-do run' directives from these
testcases, as most other vect testcases don't have such directives,
preferring to use dg-do-what-default in vect.exp instead.
Tested on powerpc-eabi. OK to commit?
2009-03-11 Nathan Froyd <froydnj@codesourcery.com>
* gcc.dg/vect/vect-82.c: Delete dg-do directive.
* gcc.dg/vect/vect-83.c: Likewise.
Index: gcc.dg/vect/vect-82.c
===================================================================
--- gcc.dg/vect/vect-82.c (revision 144788)
+++ gcc.dg/vect/vect-82.c (working copy)
@@ -1,4 +1,3 @@
-/* { dg-do run { target powerpc*-*-* } } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
Index: gcc.dg/vect/vect-83.c
===================================================================
--- gcc.dg/vect/vect-83.c (revision 144788)
+++ gcc.dg/vect/vect-83.c (working copy)
@@ -1,4 +1,3 @@
-/* { dg-do run { target powerpc*-*-* } } */
/* { dg-require-effective-target vect_int } */
#include <stdarg.h>
More information about the Gcc-patches
mailing list