brintos

brintos / llvm-project-archived public Read only

0
0
Text · 612 B · 83a27cb Raw
20 lines · cpp
1// RUN: %clang_cc1 -ffp-contract=on -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s2// Verify that float_control does not pertain to initializer expressions3 4float y();5float z();6#pragma float_control(except, on)7class ON {8  float w = 2 + y() * z();9  // CHECK-LABEL: define {{.*}} @_ZN2ONC2Ev{{.*}}10  // CHECK: llvm.experimental.constrained.fmul{{.*}}tonearest{{.*}}strict11};12ON on;13#pragma float_control(except, off)14class OFF {15  float w = 2 + y() * z();16  // CHECK-LABEL: define {{.*}} @_ZN3OFFC2Ev{{.*}}17  // CHECK-NOT: llvm.experimental.constrained.fmul{{.*}}tonearest{{.*}}strict18};19OFF off;20