https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123726
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Note, DECL_CONTEXT can be NULL and the compiler would ICE then. So I think it needs to be (scope == NULL || !CLASS_TYPE_P (scope)). Though, shouldn't it diagnose also other decls which aren't in class scope?
