The gcc documentation says that __builtin_types_compatible_p(t1, t2) "ignores top level qualifiers (e.g. const, volatile)", and indeed it does:
__builtin_types_compatible_p(t1, t2)