php-src/Zend/tests/coalesce_assign_optimization.phpt
Nikita Popov bbd3f714d7 Fix COPY_TMP live range construction after optimization
If we optimize the FREE away, we should switch to constructing
a normal live range, rather than a split live range.

Fixes oss-fuzz #39548.
2021-10-05 11:28:16 +02:00

18 lines
247 B
PHP

--TEST--
Live range construction should not break if colesce assign branch is optimized away
--FILE--
<?php
function test() {
$a[X] ??= Y;
var_dump($a);
}
define('X', 1);
define('Y', 2);
test();
?>
--EXPECT--
array(1) {
[1]=>
int(2)
}