blob: b4a04ff6b6ab4fdb475f4e157a30778df6b11be1 [file] [log] [blame]
Eric Christophere6f75362011-07-26 20:31:17 +00001// RUN: %clang_cc1 %s -emit-llvm -o - -fmath-errno | FileCheck %s
2// llvm.sqrt has undefined behavior on negative inputs, so it is
3// inappropriate to translate C/C++ sqrt to this.
4
5float sqrtf(float x);
6float foo(float X) {
7// CHECK: foo
8// CHECK-NOT: readonly
9// CHECK: call float @sqrtf
10 // Check that this is not marked readonly when errno is used.
11 return sqrtf(X);
12}