1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00
Files
archived-php-src/Zend/tests/match/044.phpt
T
Nikita Popov 17d6efc729 Fix block marking for two arm math
This would end up taking the successors_count=2 case, even though
we need to treat SWITCH and MATCH differently. This incorrectly
marked a block as FOLLOW, resulting in incorrect block pass
optimization.

Fixes oss-fuzz #39380.
2021-09-28 10:37:54 +02:00

13 lines
168 B
PHP

--TEST--
Incorrect cfg block marking for two arm match
--FILE--
<?php
$x = 2;
var_dump(match ($x) {
2,2 => 'x',
default => 'y',
});
?>
--EXPECT--
string(1) "x"