fix gtDispTree (#14326)
authorSergey Andreenko <seandree@microsoft.com>
Thu, 5 Oct 2017 18:21:19 +0000 (11:21 -0700)
committerGitHub <noreply@github.com>
Thu, 5 Oct 2017 18:21:19 +0000 (11:21 -0700)
* fix gtDispTree

It is legal situation when we pass ILNone (for example for local stores:
gtDispChild(tree->gtOp.gtOp1, indentStack, IINone);). In this code we
poped value and didn't push anything back, it ended with the stack
underflow.

src/jit/gentree.cpp

index c3fbc27..c095507 100644 (file)
@@ -10939,8 +10939,12 @@ void Compiler::gtDispTree(GenTreePtr   tree,
                 indentStack->Push(IIEmbedded);
                 lowerArc = IIEmbedded;
                 break;
+            case IINone:
+                indentStack->Push(IINone);
+                lowerArc = IINone;
+                break;
             default:
-                // Should never get here; just use IINone.
+                unreached();
                 break;
         }
     }