https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71685
--- Comment #7 from Jim Wilson <wilson at gcc dot gnu.org> --- An early exit if type_quals is 0 does not work, as there is at least one place that deliberately calls c_build_qualified_type with no type qualifiers to create an unqualified type from a qualified type. Likewise, my earlier suggestion of a check for var_type != type can't work as it fails in this case too. I can see another possible fix, checking for type_quals non-zero before clearing the C_TYPE_INCOMPLETE_VARS, but given how complicated this code is turning out to be, the check for a type main variant is the safest fix. And I see that Jakub has just checked in a patch for that solution, so I'm assuming I don't need to do anymore work on this.