fix for -O gen-C++ dealing with type constants of unnamed compound types

This commit is contained in:
Vern Paxson 2025-05-31 12:49:37 -07:00
parent 224519c11a
commit e165e64fa5
3 changed files with 8 additions and 11 deletions

View file

@ -154,8 +154,7 @@ void CPP_IndexedInits<T>::Generate(InitsManager* im, std::vector<FuncValPtr>& iv
template<class T>
void CPP_IndexedInits<T>::Generate(InitsManager* im, std::vector<TypeValPtr>& ivec, int offset,
ValElemVec& init_vals) const {
auto bt = base_type(static_cast<TypeTag>(init_vals[0]));
auto t = make_intrusive<TypeType>(bt);
auto t = make_intrusive<TypeType>(im->Types(init_vals[0]));
ivec[offset] = make_intrusive<TypeVal>(t);
}