Skip to content

Commit cdb9952

Browse files
author
Kostiantyn Lazukin
committed
[compiler-rt] Fix addtf3_test.c being skipped due to misplaced include
The test `addtf3_test.c` is currently guarded by `#if defined(CRT_HAS_IEEE_TF)`, a macro that is declared in `int_lib.h`. However, `int_lib.h` is included *after* the preprocessor check, which results in the macro not being defined in time and causes the test to always be skipped. This patch moves the includes of `fp_test.h` and `int_lib.h` to the top of the file so that `CRT_HAS_IEEE_TF` is defined before it is checked.
1 parent 4dd7fea commit cdb9952

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler-rt/test/builtins/Unit/addtf3_test.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
#include <fenv.h>
55
#include <stdio.h>
66

7+
#include "fp_test.h"
8+
#include "int_lib.h"
9+
710
// The testcase currently assumes IEEE TF format, once that has been
811
// fixed the defined(CRT_HAS_IEEE_TF) guard can be removed to enable it for
912
// IBM 128 floats as well.
1013
#if defined(CRT_HAS_IEEE_TF)
1114

12-
# include "fp_test.h"
13-
# include "int_lib.h"
14-
1515
// Returns: a + b
1616
COMPILER_RT_ABI tf_float __addtf3(tf_float a, tf_float b);
1717

0 commit comments

Comments
 (0)