https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71685

--- Comment #4 from Jim Wilson <wilson at gcc dot gnu.org> ---
The problem here is that I assumed that c_build_qualified_type would only be
called when we want to create a variant type.  However, there are a number of
places that call it without checking to see if we have any type qualifiers
first.  These places can call it with no qualifiers, in which case it returns
the original type, which may be a main variant type.  So we need to avoid
clearing C_TYPE_INCOMPLETE_TYPE in that case.  Perhaps with an early exit at
the top if type_quals is 0.  Or alternatively, at the bottom, we can clear
C_TYPE_INCOMPLETE_TYPE only if var_type != type.

Reply via email to