summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/no-junk-ftrunc.c
blob: a645d968866968d6f3e502267c35b43cc8686727 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// RUN: %clang_cc1 -S -fno-strict-float-cast-overflow %s -emit-llvm -o - | FileCheck %s --check-prefix=NOSTRICT
// NOSTRICT-LABEL: main
// NOSTRICT: attributes #0 = {{.*}}"strict-float-cast-overflow"="false"{{.*}}

// The workaround attribute is not applied by default.

// RUN: %clang_cc1 -S %s -fstrict-float-cast-overflow -emit-llvm -o - | FileCheck %s --check-prefix=STRICT
// STRICT-LABEL: main
// STRICT-NOT: strict-float-cast-overflow

// RUN: %clang_cc1 -S %s -emit-llvm -o - | FileCheck %s --check-prefix=DEFAULT
// DEFAULT-LABEL: main
// DEFAULT-NOT: strict-float-cast-overflow

int main() {
  return 0;
}