1f5360d4bSMelanie Blower // RUN: %clang_cc1 -ffp-contract=on -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s
2f5360d4bSMelanie Blower // Verify that float_control does not pertain to initializer expressions
3f5360d4bSMelanie Blower 
4f5360d4bSMelanie Blower float y();
5f5360d4bSMelanie Blower float z();
6f5360d4bSMelanie Blower #pragma float_control(except, on)
7f5360d4bSMelanie Blower class ON {
8f5360d4bSMelanie Blower   float w = 2 + y() * z();
97cbb495aSMelanie Blower   // CHECK-LABEL: define {{.*}} @_ZN2ONC2Ev{{.*}}
10*bc5b5ea0SMelanie Blower   // CHECK: llvm.experimental.constrained.fmul{{.*}}tonearest{{.*}}strict
11f5360d4bSMelanie Blower };
12f5360d4bSMelanie Blower ON on;
13f5360d4bSMelanie Blower #pragma float_control(except, off)
14f5360d4bSMelanie Blower class OFF {
15f5360d4bSMelanie Blower   float w = 2 + y() * z();
167cbb495aSMelanie Blower   // CHECK-LABEL: define {{.*}} @_ZN3OFFC2Ev{{.*}}
17*bc5b5ea0SMelanie Blower   // CHECK-NOT: llvm.experimental.constrained.fmul{{.*}}tonearest{{.*}}strict
18f5360d4bSMelanie Blower };
19f5360d4bSMelanie Blower OFF off;
20