repo.or.cz
/
llvm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Clean up some of LVI:
[llvm.git]
/
test
/
FrontendC
/
2009-09-24-SqrtErrno.c
blob
09fc8764ea51996c44567ffcda78652e81f7f1e3
1
// RUN: %llvmgcc %s -S -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
#include <math.h>
5
6
float
foo
(
float
X
) {
7
// CHECK: foo
8
// CHECK-NOT: readonly
9
// CHECK: return
10
// Check that this is not marked readonly when errno is used.
11
return
sqrtf
(
X
);
12
}