[LLVMdev] Incompatible types at call site

Arushi Aggarwal arushi987 at gmail.com
Wed Apr 6 06:46:25 PDT 2011


On Wed, Apr 6, 2011 at 8:35 AM, Duncan Sands <baldrick at free.fr> wrote:

> Hi Arushi,
>
>
>  I got this from C code compiled by llvm-gcc.
>>
>> There is a consistent prototype for the function
>>
>> TypHandle       Cyclotomic ( hdRes, n, m )
>>     TypHandle           hdRes;
>>     long                n,  m;
>>
>> the call looks as follows,
>>  hdI = ProdCyc( hdI, Cyclotomic( HdResult, n, 1 ) );
>>
>
> I bet the call occurs before the function is defined.  In this case C
> treats
> the callee as being a varargs function (...) of the kind you see in your
> IR.
>

Unfortunately that is't true either :(

Also, the calls which do not pass a constant int, do not get the cast on the
function.

>
> Ciao, Duncan.
>
>
>
>> which is basically
>>
>> Cyclotomic( HdResult, n, 1 );
>>
>> The problem is the fact that it interprets 1 as an int32 instead of an
>> int64.
>> And later converts it by assuming an unsigned to unsigned cast.
>>
>> Arushi
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110406/ee912fd7/attachment.html>


More information about the llvm-dev mailing list