[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / rounding-math.c
blob6673dfba8a953da4d810f407d1274050205941ed
1 // RUN: %clang_cc1 -fexperimental-strict-floating-point -S -emit-llvm -ffp-exception-behavior=strict -Wno-unknown-pragmas %s -o - | FileCheck %s
2 // RUN: %clang_cc1 -fexperimental-strict-floating-point -S -emit-llvm -frounding-math -Wno-unknown-pragmas %s -o - | FileCheck %s
4 float PR47807 = -8.6563630030e-03;
6 // nextUp(1.F) == 0x1.000002p0F
8 struct S {
9 float f;
12 static struct S var_01 = {0x1.000001p0};
13 struct S *func_01(void) {
14 return &var_01;
17 struct S var_02 = {0x1.000001p0};
19 struct S *func_03(void) {
20 static struct S var_03 = {0x1.000001p0};
21 return &var_03;
24 // CHECK: @var_01 = {{.*}} %struct.S { float 1.000000e+00 }
25 // CHECK: @var_02 = {{.*}} %struct.S { float 1.000000e+00 }
26 // CHECK: @func_03.var_03 = {{.*}} %struct.S { float 1.000000e+00 }
28 #pragma STDC FENV_ROUND FE_UPWARD
30 static struct S var_04 = {0x1.000001p0};
31 struct S *func_04(void) {
32 return &var_04;
35 struct S var_05 = {0x1.000001p0};
37 struct S *func_06(void) {
38 static struct S var_06 = {0x1.000001p0};
39 return &var_06;
42 // CHECK: @var_04 = {{.*}} %struct.S { float 0x3FF0000020000000 }
43 // CHECK: @var_05 = {{.*}} %struct.S { float 0x3FF0000020000000 }
44 // CHECK: @func_06.var_06 = {{.*}} %struct.S { float 0x3FF0000020000000 }