2019-11-11 Jakub Jelinek <jakub@redhat.com>
+ PR c++/92447
+ * decl.c (finish_function): Move ctype initialization before
+ DECL_DELETED_FN handling.
+
* semantics.c (finish_translation_unit): Diagnose declare target
without corresponding end declare target.
}
}
+ /* Remember that we were in class scope. */
+ if (current_class_name)
+ ctype = current_class_type;
+
if (DECL_DELETED_FN (fndecl))
{
DECL_INITIAL (fndecl) = error_mark_node;
current_function_return_value = NULL_TREE;
}
- /* Remember that we were in class scope. */
- if (current_class_name)
- ctype = current_class_type;
-
/* Must mark the RESULT_DECL as being in this function. */
DECL_CONTEXT (DECL_RESULT (fndecl)) = fndecl;
2019-11-11 Jakub Jelinek <jakub@redhat.com>
+ PR c++/92447
+ * g++.dg/cpp0x/pr92447.C: New test.
+
* c-c++-common/gomp/declare-target-5.c: New test.
2019-11-11 Richard Sandiford <richard.sandiford@arm.com>