https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69375
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- For the attached reproducer this condition is never true in cp_build_qualified_type_real /* But preserve any function-cv-quals on a FUNCTION_TYPE. */ if (TREE_CODE (type) == FUNCTION_TYPE) type_quals |= type_memfn_quals (type); As far as I can tell this is what's supposed to put the cv-quals back onto the function type, so we'd have a pointee of type void() const not void().