[Bug c++/35889] New: spu_check_builtin_parm function fails on templates.

rbertran at ac dot upc dot edu gcc-bugzilla@gcc.gnu.org
Wed Apr 9 15:17:00 GMT 2008


Hello,

I'm using gcc4.3.0 for compiling cell binaries on a x86 platform.
I've some benchmarks that use c++ templates like:

template < typename T> inline
T rot_veci( T v, int n )
{
return (T) si_rotqbyi( (vector signed char)v, n );
}

When compiling, I get the following error:

error: si_rotqbyi expects an integer literal in the range [-64, 127].

So, I suppose that gcc is not able to know the value of the 'n' parameter.
Then, the builtins intrinsics checks for the literal range and raise the
error.

I've been googling and I found references [1][2] about this problem (or
similar problem). I guess that the problem comes from the
spu_check_builtin_parm function in gcc/config/spu/spu.c . I have reported
the problem to IBM cell forums, too.

Thanks in advance,
Salut!

[1] http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00130.html
[2] http://gcc.gnu.org/ml/gcc-patches/2006-12/txt00000.txt


-- 
           Summary: spu_check_builtin_parm function fails on templates.
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rbertran at ac dot upc dot edu
 GCC build triplet: x86-linux-gnu
  GCC host triplet: x86-linux-gnu
GCC target triplet: spu-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35889



More information about the Gcc-bugs mailing list