The `Enum.HasFlag` opt needs to clone the enum values, and they
can be long constants. Make sure `gtClone` handles this case.
Closes #14149.
}
break;
+ case GT_CNS_LNG:
+ copy = gtNewLconNode(tree->gtLngCon.gtLconVal);
+ break;
+
case GT_LCL_VAR:
// Remember that the LclVar node has been cloned. The flag will be set
// on 'copy' as well.
if (thisVal->IsIntegralConst())
{
thisValOpt = gtClone(thisVal);
+ assert(thisValOpt != nullptr);
}
else
{
if (flagVal->IsIntegralConst())
{
- flagValOpt = gtClone(flagVal);
+ flagValOpt = gtClone(flagVal);
+ assert(flagValOpt != nullptr);
flagValOptCopy = gtClone(flagVal);
+ assert(flagValOptCopy != nullptr);
}
else
{