[Bug target/36837] New: Return type of spu_splats is not deduced correctly
jadamcze at utas dot edu dot au
gcc-bugzilla@gcc.gnu.org
Tue Jul 15 13:52:00 GMT 2008
For the following fragment :
#include <spu_intrinsics.h>
vector unsigned int f() {
return spu_splats( (unsigned int)7 );
}
Compiling with spu-elf-gcc is fine. Compiling with spu-elf-g++ generates an
error:
$ usr/bin/spu-elf-g++ -c splat.cpp
splat.cpp: In function 'unsigned int __vector__ f()':
splat.cpp:3: note: use -flax-vector-conversions to permit conversions between
vectors with differing element types or numbers of subparts
splat.cpp:3: error: cannot convert 'unsigned char __vector__' to 'unsigned int
__vector__' in return
Replacing spu_splats with __builtin_spu_splats_4 allows the fragment to be
compiled correctly.
Observed with r137813.
Compiles as expected in :
gcc version 4.4.0 20080404 (experimental)
gcc version 4.3.0 20071012 (experimental)
gcc version 4.1.1 (IBM SDK 3.0 release)
--
Summary: Return type of spu_splats is not deduced correctly
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jadamcze at utas dot edu dot au
GCC target triplet: spu-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36837
More information about the Gcc-bugs
mailing list