This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Committed] Fix some ICE with invalid arguments to some SPU intrinsics

  With some invalid arguments to some of the SPU intrinsics would cause us 
to ICE.
This was because we did not compare argument types if the paramater type 
of the
function was not a vector type which is incorrect.  This would cause 
spu_cmpgt to
ICE with two different vector types passed to it.

This patch fixes the problem by instead of checking for vector types, 
check for not scalar
types for both the argument of the function call and the function decl.

Also if a pointer type was passed where we expected an scalar integer we 
would accept
this case as we would implictly convert it to the type.  This case is also 
invalid and we should
at least reject it for the -pedantic-errors case.  I fixed that case by 
using the front-end's
build_function_call instead of creating using our own function to create 
the function
call expression.

This patch also adds a directory which can be used for SPU 
specific tests, it
is an exact copy of except for the change 
of names and comments.

Committed after a build/test for spu-elf.

Andrew Pinski


        * config/spu/spu-c.c (spu_build_overload_builtin): Delete.
        (spu_resolve_overloaded_builtin): Check for non scalar instead
        of vector type and check the function call argument type also for 
non scalar.
        Call build_function_call instead of spu_build_overload_builtin.

        * New directory.
        * New file.
        * New test.

Attachment: fixintrinsics.diff.txt
Description: Text document

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]