We were (unintentionally) only using structural equivalence to compare struct types.
Now we require that the struct name match for two struct types to be the same. Added a test to check this. (Also removed a stale test, movmsk-opt.ispc)
This commit is contained in:
2
type.cpp
2
type.cpp
@@ -2448,6 +2448,8 @@ lCheckTypeEquality(const Type *a, const Type *b, bool ignoreConst) {
|
||||
if (sta != NULL && stb != NULL) {
|
||||
if (sta->GetElementCount() != stb->GetElementCount())
|
||||
return false;
|
||||
if (sta->GetStructName() != stb->GetStructName())
|
||||
return false;
|
||||
for (int i = 0; i < sta->GetElementCount(); ++i)
|
||||
if (!lCheckTypeEquality(sta->GetElementType(i), stb->GetElementType(i),
|
||||
ignoreConst))
|
||||
|
||||
Reference in New Issue
Block a user