Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash in constant initializer lowering for global variable.
In microsoft#6814, we modified the compiler to avoid generating bad code in some cases for array initializers. However, this caused a crash in the case where the initializer does not use a GEP expression for addressing because the `GV` will be null. I considered setting `GV` to the value in the `store` pointer operand, but it looked like `GV` was also checked elsewhere for null and did not want to modify the behavior of the code in other places. The fix is to check if we found a global variable before validating the array case.
- Loading branch information