-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check that POST_INC/DEC has use in DFA optimization
We'd have usually converted it into a PRE_INC if there is no use, but that's not guaranteed. If there is no use at this point, make sure we don't try to use the sentinel value.
- Loading branch information
Showing
2 changed files
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--TEST-- | ||
POST_INC without use during DFA optimization | ||
--FILE-- | ||
<?php | ||
|
||
function test($n) { | ||
for ($i = 0; $i < $n; !$i++) {} | ||
} | ||
|
||
?> | ||
===DONE=== | ||
--EXPECT-- | ||
===DONE=== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters