https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117145
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |jsm28 at gcc dot gnu.org --- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- This doesn't look correct to me. build_pointer_type_for_mode, build_function_type and build_array_type all use type hash tables to share types, so copying such flags into the shared types looks problematic (unless there is a guarantee that if one type has that flag, all types shared with those must have those flags too). If it is not the case, then I think we should build_variant_type_copy before setting such flags. If C_TYPE_VARIABLY_MODIFIED/C_TYPE_VARIABLE_SIZE flags are implied from other properties of the types (compared in the generic code in the canon type hash lookups), say the fact that ARRAY_TYPE domain isn't constant implies C_TYPE_VARIABLY_MODIFIED, then perhaps it would be better to assert somehow that if the type hasn't been newly created, it already has the desired flags, instead of always overwriting them.