| 1 | // RUN: %clang_cc1 -S -fno-strict-float-cast-overflow %s -emit-llvm -o - | FileCheck %s --check-prefix=NOSTRICT |
| 2 | // NOSTRICT-LABEL: main |
| 3 | // NOSTRICT: attributes #0 = {{.*}}"strict-float-cast-overflow"="false"{{.*}} |
| 4 | |
| 5 | // The workaround attribute is not applied by default. |
| 6 | |
| 7 | // RUN: %clang_cc1 -S %s -fstrict-float-cast-overflow -emit-llvm -o - | FileCheck %s --check-prefix=STRICT |
| 8 | // STRICT-LABEL: main |
| 9 | // STRICT-NOT: strict-float-cast-overflow |
| 10 | |
| 11 | // RUN: %clang_cc1 -S %s -emit-llvm -o - | FileCheck %s --check-prefix=DEFAULT |
| 12 | // DEFAULT-LABEL: main |
| 13 | // DEFAULT-NOT: strict-float-cast-overflow |
| 14 | |
| 15 | int main() { |
| 16 | return 0; |
| 17 | } |
| 18 | |
| 19 | |