$ cat break.cpp
#include <spu_intrinsics.h>

void f(unsigned int ui1) {
        vec_uint4 iv1 = spu_promote (ui1, 0);
}

$ spu-elf-g++ break.cpp -c
break.cpp: In function ‘void f(unsigned int)’:
break.cpp:4: note: use -flax-vector-conversions to permit conversions between
vectors with differing element types or numbers of subparts
break.cpp:4: error: cannot convert ‘unsigned char __vector__’ to ‘unsigned int
__vector__’ in initialization


No error if compiled as C.

Using mainline r146726.


-- 
           Summary: g++ incorrectly reports type error when calling
                    spu_promote()
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jadamcze at utas dot edu dot au
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: spu-elf


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

Reply via email to