llvm-6502/test/FrontendC/2005-07-20-SqrtNoErrno.c
2009-09-23 21:46:36 +00:00

11 lines
315 B
C

// RUN: %llvmgcc %s -S -o - -fno-math-errno | grep llvm.sqrt
// llvm.sqrt has undefined behavior on negative inputs, so it is
// inappropriate to translate C/C++ sqrt to this.
// XFAIL: *
#include <math.h>
float foo(float X) {
// Check that this compiles to llvm.sqrt when errno is ignored.
return sqrtf(X);
}