mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0: Fixed type inference for FETCH_DIM_W without use
This commit is contained in:
commit
22a171a0b5
@ -3363,6 +3363,10 @@ static zend_always_inline int _zend_update_type_info(
|
||||
|| opline->opcode == ZEND_FETCH_DIM_FUNC_ARG
|
||||
|| opline->opcode == ZEND_FETCH_LIST_W) {
|
||||
j = ssa_vars[ssa_op->result_def].use_chain;
|
||||
if (j < 0) {
|
||||
/* no uses */
|
||||
tmp |= key_type | MAY_BE_ARRAY | MAY_BE_ARRAY_OF_NULL;
|
||||
}
|
||||
while (j >= 0) {
|
||||
zend_uchar opcode;
|
||||
|
||||
|
17
ext/opcache/tests/jit/fetch_dim_w_002.phpt
Normal file
17
ext/opcache/tests/jit/fetch_dim_w_002.phpt
Normal file
@ -0,0 +1,17 @@
|
||||
--TEST--
|
||||
JIT FETCH_DIM_W: 002
|
||||
--INI--
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.file_update_protection=0
|
||||
opcache.jit_buffer_size=1M
|
||||
--FILE--
|
||||
<?php
|
||||
function test() {
|
||||
$b = [&$a[0]];
|
||||
}
|
||||
test();
|
||||
?>
|
||||
DONE
|
||||
--EXPECT--
|
||||
DONE
|
Loading…
Reference in New Issue
Block a user