File tree 2 files changed +24
-0
lines changed
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,9 @@ case $host_cpu in
220
220
;;
221
221
esac
222
222
223
+ dnl See https://github.com/php/php-src/issues/14140
224
+ AX_CHECK_COMPILE_FLAG ( [ -ffp-contract=off] , [ CFLAGS="$CFLAGS -ffp-contract=off"] )
225
+
223
226
dnl Mark symbols hidden by default if the compiler (for example, gcc >= 4)
224
227
dnl supports it. This can help reduce the binary size and startup time.
225
228
AX_CHECK_COMPILE_FLAG ( [ -fvisibility=hidden] ,
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-14140: Floating point bug in range operation on Apple Silicon hardware
3
+ --FILE--
4
+ <?php
5
+ /*
6
+ * This is a problem that occurs not only in Apple silicon, but also in the Arm
7
+ * processor environment in general, which uses clang as the compiler.
8
+ */
9
+ print_r (range (-0.03 , 0.03 , 0.01 ));
10
+ ?>
11
+ --EXPECT--
12
+ Array
13
+ (
14
+ [0] => -0.03
15
+ [1] => -0.02
16
+ [2] => -0.01
17
+ [3] => 0
18
+ [4] => 0.01
19
+ [5] => 0.02
20
+ [6] => 0.03
21
+ )
You can’t perform that action at this time.
0 commit comments