* typeck.c (can_do_nrvo_p): Check error_mark_node.
* g++.dg/cpp1y/auto-fn55.C: New test.
From-SVN: r267926
* decl2.c (maybe_emit_vtables): Check CLASSTYPE_LAZY_DESTRUCTOR.
Fix formatting.
+ PR c++/88825 - ICE with bogus function return type deduction.
+ * typeck.c (can_do_nrvo_p): Check error_mark_node.
+
2019-01-14 Tom Honermann <tom@honermann.net>
Implement P0482R5, char8_t: A type for UTF-8 characters and strings
static bool
can_do_nrvo_p (tree retval, tree functype)
{
+ if (functype == error_mark_node)
+ return false;
if (retval)
STRIP_ANY_LOCATION_WRAPPER (retval);
tree result = DECL_RESULT (current_function_decl);
+2019-01-14 Marek Polacek <polacek@redhat.com>
+
+ PR c++/88825 - ICE with bogus function return type deduction.
+ * g++.dg/cpp1y/auto-fn55.C: New test.
+
2019-01-14 Jakub Jelinek <jakub@redhat.com>
* g++.dg/cpp1z/feat-cxx1z.C: Add tests for
--- /dev/null
+// PR c++/88825
+// { dg-do compile { target c++14 } }
+
+auto f () -> auto *
+{
+ int t = 0;
+ return t; // { dg-error "unable to deduce" }
+}