From 8997a8136f64eb457b20a35744559f1557bd0390 Mon Sep 17 00:00:00 2001 From: Fred Chow Date: Sun, 29 Aug 2021 13:10:24 -0700 Subject: [PATCH] Fixed alias analysis bug where requiring offset to be exactly matched overlooked the entire symbol with unknown offset (issue I47PHL) --- src/mapleall/maple_me/src/orig_symbol.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mapleall/maple_me/src/orig_symbol.cpp b/src/mapleall/maple_me/src/orig_symbol.cpp index ee6bab28ff..c060c88842 100644 --- a/src/mapleall/maple_me/src/orig_symbol.cpp +++ b/src/mapleall/maple_me/src/orig_symbol.cpp @@ -267,7 +267,8 @@ OriginalSt *OriginalStTable::FindOrCreateExtraLevOriginalSt(OriginalSt *ost, TyI OriginalSt *OriginalStTable::FindExtraLevOriginalSt(const MapleVector &nextLevelOsts, MIRType *type, FieldID fld, const OffsetType &offset) { for (OriginalSt *nextLevelOst : nextLevelOsts) { - if (nextLevelOst->GetOffset() == offset && nextLevelOst->GetType() == type) { + if (nextLevelOst->GetOffset().IsInvalid() || + (nextLevelOst->GetOffset() == offset && nextLevelOst->GetType() == type)) { if (nextLevelOst->GetFieldID() == fld || fld == 0) { return nextLevelOst; } -- Gitee