1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/opcache/tests/jit/gh19669-002.phpt
Arnaud Le Blanc 75945580bc Fix deoptimization after exit during inc/dec
When the assumption that (PRE|POST)_(INC|DEC) overflows turns out to be
false and we exit, effects are lost if op1 or result were in regs.

Fix by updating the stack map before creating the exit point.

Fixes GH-19669
Closes GH-19680
2025-09-11 12:35:39 +02:00

25 lines
384 B
PHP

--TEST--
GH-19669 002: assertion failure zend_jit_trace_type_to_info_ex
--CREDITS--
YuanchengJiang
--SKIPIF--
<?php
if (PHP_INT_SIZE !== 8) {
die('skip output depends PHP_INT_SIZE=8');
}
?>
--FILE--
<?php
function test() {
$a = PHP_INT_MIN;
$b = -1;
while ($b++ < 2) {
$a = (int) (--$a + $a - $b);
}
return $a;
}
var_dump(test());
?>
--EXPECT--
int(-10)