[cfe-dev] Assertion failure with __builtin_isless

Nuno Lopes nunoplopes at sapo.pt
Fri Jun 27 15:12:06 PDT 2008


Please report this problem in our Bugzilla (http://llvm.org/bugs/), 
otherwise it may get lost.

Thanks,
Nuno


----- Original Message ----- 
From: "Dan Nelson" <dnelson at allantgroup.com>
To: <cfe-dev at cs.uiuc.edu>
Sent: Tuesday, June 24, 2008 11:07 PM
Subject: [cfe-dev] Assertion failure with __builtin_isless


>
> The following program fragment gets me an assertion error:
>
> union anything
> {
>        long integer;
>        float float_number;
> };
>
> int is_lt(const union anything *a, const union anything *b)
> {
>        return __builtin_isless(((float)a->integer), (b->float_number));
> }
>
> $ clang -emit-llvm-bc test.c
> Assertion failed: (getOperand(0)->getType() == getOperand(1)->getType() && 
> "Both operands to FCmp instruction are not of the same type!"), function 
> FCmpInst, file /usr/tmp/cvs/llvm/include/llvm/Instructions.h, line 776.
> [1]    67289 abort (core dumped)  clang -emit-llvm-bc test.c
> $
>
> But both arguments to __builtin_isless are floats, right?
>
> Currently running llvm tree rev 52681.
>
> -- 
> Dan Nelson
> dnelson at allantgroup.com
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev 




More information about the cfe-dev mailing list