mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-13 17:37:00 +00:00

A significant number of our tests in C accidentally use functions without prototypes. This patch converts the function signatures to have a prototype for the situations where the test is not specific to K&R C declarations. e.g., void func(); becomes void func(void); This is the eleventh batch of tests being updated (there are a significant number of other tests left to be updated).
46 lines
1.2 KiB
C
46 lines
1.2 KiB
C
// RUN: %clang_cc1 -fexperimental-strict-floating-point -S -emit-llvm -ffp-exception-behavior=strict -Wno-unknown-pragmas %s -o - | FileCheck %s
|
|
// RUN: %clang_cc1 -fexperimental-strict-floating-point -S -emit-llvm -frounding-math -Wno-unknown-pragmas %s -o - | FileCheck %s
|
|
|
|
float PR47807 = -8.6563630030e-03;
|
|
|
|
// nextUp(1.F) == 0x1.000002p0F
|
|
|
|
struct S {
|
|
float f;
|
|
};
|
|
|
|
static struct S var_01 = {0x1.000001p0};
|
|
struct S *func_01(void) {
|
|
return &var_01;
|
|
}
|
|
|
|
struct S var_02 = {0x1.000001p0};
|
|
|
|
struct S *func_03(void) {
|
|
static struct S var_03 = {0x1.000001p0};
|
|
return &var_03;
|
|
}
|
|
|
|
// CHECK: @var_01 = {{.*}} %struct.S { float 1.000000e+00 }
|
|
// CHECK: @var_02 = {{.*}} %struct.S { float 1.000000e+00 }
|
|
// CHECK: @func_03.var_03 = {{.*}} %struct.S { float 1.000000e+00 }
|
|
|
|
#pragma STDC FENV_ROUND FE_UPWARD
|
|
|
|
static struct S var_04 = {0x1.000001p0};
|
|
struct S *func_04(void) {
|
|
return &var_04;
|
|
}
|
|
|
|
struct S var_05 = {0x1.000001p0};
|
|
|
|
struct S *func_06(void) {
|
|
static struct S var_06 = {0x1.000001p0};
|
|
return &var_06;
|
|
}
|
|
|
|
// CHECK: @var_04 = {{.*}} %struct.S { float 0x3FF0000020000000 }
|
|
// CHECK: @var_05 = {{.*}} %struct.S { float 0x3FF0000020000000 }
|
|
// CHECK: @func_06.var_06 = {{.*}} %struct.S { float 0x3FF0000020000000 }
|
|
|