1--TEST--
2JIT FETCH_DIM_R: 005
3--INI--
4opcache.enable=1
5opcache.enable_cli=1
6opcache.file_update_protection=0
7opcache.jit=tracing
8--EXTENSIONS--
9opcache
10--FILE--
11<?php
12$gens = [];
13for ($i = 0; $i < 5; $i++) {
14    $gens[] = $gens[-1];
15}
16var_dump($gens);
17?>
18--EXPECTF--
19Warning: Undefined array key -1 in %sfetch_dim_r_005.php on line 4
20
21Warning: Undefined array key -1 in %sfetch_dim_r_005.php on line 4
22
23Warning: Undefined array key -1 in %sfetch_dim_r_005.php on line 4
24
25Warning: Undefined array key -1 in %sfetch_dim_r_005.php on line 4
26
27Warning: Undefined array key -1 in %sfetch_dim_r_005.php on line 4
28array(5) {
29  [0]=>
30  NULL
31  [1]=>
32  NULL
33  [2]=>
34  NULL
35  [3]=>
36  NULL
37  [4]=>
38  NULL
39}
40