Simplfy test case
authorXinchen Hui <laruence@gmail.com>
Mon, 18 Mar 2019 11:28:23 +0000 (19:28 +0800)
committerXinchen Hui <laruence@gmail.com>
Mon, 18 Mar 2019 11:28:23 +0000 (19:28 +0800)
(I was working on the same bug while nikic committed the similar fix

ext/opcache/tests/bug77743.phpt

index 61627b198d7fda4f7e24b50cc77b85840dc1a078..95f834947214e255f9d403473842be0238117c2f 100644 (file)
@@ -2,33 +2,16 @@
 Bug #77743: Incorrect pi node insertion for jmpznz with identical successors
 --FILE--
 <?php
-class Toto
-{
-    public function process1()
-    {
-        $keep_products = [1, 2, 3, 4];
-        foreach ($keep_products as $k => $v)
-        {
-            $id_country = myRet(45);
-            if ($id_country === false && false)
-            {
-            }
 
-            var_dump($id_country === false);
-        }
-    }
+function buggy($a) {
+       $id_country = $a;
+       if ($id_country === false) {
+               if (true) {
+               }
+       }
+       var_dump($id_country);
 }
 
-function myRet($x){
-    return $x;
-}
-
-$toto = new Toto();
-$toto->process1();
-
-?>
+buggy(42);
 --EXPECT--
-bool(false)
-bool(false)
-bool(false)
-bool(false)
+int(42)