diff options
| author | Nikita Popov <nikic@php.net> | 2016-05-18 23:46:20 +0200 |
|---|---|---|
| committer | Nikita Popov <nikic@php.net> | 2016-05-24 18:29:45 +0200 |
| commit | a19eb8e34abc0b41e821cbf67930bf64fcb9e65d (patch) | |
| tree | 66524cfa0324aa18330be7fab442d8a31c763d38 /Zend | |
| parent | e745b4cad855a70ddee788cb77ef7f470fd2a137 (diff) | |
| download | php-git-a19eb8e34abc0b41e821cbf67930bf64fcb9e65d.tar.gz | |
Ensure no entry predecessors for SSA construction
Diffstat (limited to 'Zend')
| -rw-r--r-- | Zend/tests/entry_block_with_predecessors.phpt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Zend/tests/entry_block_with_predecessors.phpt b/Zend/tests/entry_block_with_predecessors.phpt new file mode 100644 index 0000000000..ffc3147f1c --- /dev/null +++ b/Zend/tests/entry_block_with_predecessors.phpt @@ -0,0 +1,33 @@ +--TEST-- +For SSA form the entry block should have no predecessors +--FILE-- +<?php + +function test() { + while (true) { + var_dump($a + 1); + $a = 1; + if (@$i++) { + break; + } + } +} + +function test2() { + while (true) { + $a = 42; + if (@$i++ > 1) { + break; + } + $a = new stdClass; + } +} + +test(); +test2(); + +?> +--EXPECTF-- +Notice: Undefined variable: a in %s on line %d +int(1) +int(2) |
