aboutsummaryrefslogtreecommitdiffstats
path: root/test/FrontendC/2005-07-20-SqrtNoErrno.c
blob: 3ca70b9556f86afe79a892ef9f7bd3db8e05a675 (plain)
1
2
3
4
5
6
7
8
9
10
// 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);
}