diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index 894df6957f0..8760fafc366 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -953,7 +953,8 @@ static const zend_op *zend_jit_trace_find_init_fcall_op(zend_jit_trace_rec *p, c static int is_checked_guard(const zend_ssa *tssa, const zend_op **ssa_opcodes, uint32_t var, uint32_t phi_var) { - if ((tssa->var_info[phi_var].type & MAY_BE_ANY) == MAY_BE_LONG) { + if ((tssa->var_info[phi_var].type & MAY_BE_ANY) == MAY_BE_LONG + && !(tssa->var_info[var].type & MAY_BE_REF)) { int idx = tssa->vars[var].definition; if (idx >= 0) { diff --git a/ext/opcache/tests/jit/assign_op_003.phpt b/ext/opcache/tests/jit/assign_op_003.phpt new file mode 100644 index 00000000000..0b9c087922d --- /dev/null +++ b/ext/opcache/tests/jit/assign_op_003.phpt @@ -0,0 +1,22 @@ +--TEST-- +JIT ASSIGN_OP: 003 +--INI-- +opcache.enable=1 +opcache.enable_cli=1 +opcache.file_update_protection=0 +opcache.jit_buffer_size=1M +--FILE-- + +DONE +--EXPECT-- +DONE