1
0
mirror of https://github.com/php/php-src.git synced 2026-04-20 14:31:06 +02:00
Files
archived-php-src/ext/opcache/tests/jit/reg_alloc_006.phpt
Dmitry Stogov 079c5af9ec JIT: Fix register allocation
Fixes oss-fuzz #43598
2022-01-14 13:41:16 +03:00

34 lines
789 B
PHP

--TEST--
Register Alloction 006: Incorrect type store elimination
--INI--
opcache.enable=1
opcache.enable_cli=1
opcache.file_update_protection=0
opcache.jit_buffer_size=1M
--FILE--
<?php
function foo() {
$a = 0;
for($i=0; $i < 6; $i++) {
$y - $b = $a ? $b : $y;
$a = $b = 7;
}
}
foo()
?>
DONE
--EXPECTF--
Warning: Undefined variable $y in %sreg_alloc_006.php on line 5
Warning: Undefined variable $y in %sreg_alloc_006.php on line 5
Warning: Undefined variable $y in %sreg_alloc_006.php on line 5
Warning: Undefined variable $y in %sreg_alloc_006.php on line 5
Warning: Undefined variable $y in %sreg_alloc_006.php on line 5
Warning: Undefined variable $y in %sreg_alloc_006.php on line 5
Warning: Undefined variable $y in %sreg_alloc_006.php on line 5
DONE