1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 07:28:09 +02:00
Files
archived-php-src/Zend/tests/match/match_of_phi_optimization.phpt
T
Nikita Popov 64878757be Fix scdf loop var free check for phi vars
The variable may come from a phi node, in which case we should
take the defining block from it.

Fixes oss-fuzz #40453.
2021-11-01 11:03:17 +01:00

15 lines
289 B
PHP

--TEST--
Unreachable code elimination when match argument is a phi node
--FILE--
<?php
$x = true;
match ($x and true or true) {
false => $x
};
?>
--EXPECTF--
Fatal error: Uncaught UnhandledMatchError: Unhandled match case true in %s:%d
Stack trace:
#0 {main}
thrown in %s on line %d