File tree Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Expand file tree Collapse file tree 2 files changed +50
-1
lines changed Original file line number Diff line number Diff line change @@ -1942,7 +1942,7 @@ static void sccp_mark_feasible_successors(
1942
1942
scdf_mark_edge_feasible (scdf , block_num , target );
1943
1943
return ;
1944
1944
}
1945
- s = 0 ;
1945
+ s = block -> successors_count - 1 ;
1946
1946
break ;
1947
1947
}
1948
1948
default :
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug 80900: Switch constant with incorrect type
3
+ --INI--
4
+ opcache.enable=1
5
+ opcache.enable_cli=1
6
+ opcache.optimization_level=-1
7
+ opcache.opt_debug_level=0x20000
8
+ --EXTENSIONS--
9
+ opcache
10
+ --FILE--
11
+ <?php
12
+ function testWithVar () {
13
+ $ booleanVar = false ;
14
+ switch ($ booleanVar ) {
15
+ case 'a_test_case ' :
16
+ echo 'inside testWithVar - "a_test_case" ' ;
17
+ break ;
18
+ case 'b_test_case ' :
19
+ echo 'inside testWithVar - "b_test_case" ' ;
20
+ break ;
21
+ case 'c_test_case ' :
22
+ echo 'inside testWithVar - "c_test_case" ' ;
23
+ break ;
24
+ default :
25
+ echo 'inside testWithVar - "default" ' ;
26
+ break ;
27
+ }
28
+ echo PHP_EOL ;
29
+ }
30
+ testWithVar ();
31
+ ?>
32
+ --EXPECTF--
33
+ $_main:
34
+ ; (lines=3, args=0, vars=0, tmps=0)
35
+ ; (after optimizer)
36
+ ; %sbug80900.php:1-22
37
+ 0000 INIT_FCALL 0 80 string("testwithvar")
38
+ 0001 DO_UCALL
39
+ 0002 RETURN int(1)
40
+
41
+ testWithVar:
42
+ ; (lines=3, args=0, vars=0, tmps=0)
43
+ ; (after optimizer)
44
+ ; %sbug80900.php:2-19
45
+ 0000 ECHO string("inside testWithVar - "default"")
46
+ 0001 ECHO string("
47
+ ")
48
+ 0002 RETURN null
49
+ inside testWithVar - "default"
You can’t perform that action at this time.
0 commit comments