[LLVMdev] Incompatible types at call site

Duncan Sands baldrick at free.fr
Wed Apr 6 06:35:33 PDT 2011


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.

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




More information about the llvm-dev mailing list