[cfe-dev] Assertion failure with __builtin_isless
Dan Nelson
dnelson at allantgroup.com
Tue Jun 24 15:07:01 PDT 2008
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
More information about the cfe-dev
mailing list