+2019-03-01 Marek Polacek <polacek@redhat.com>
+
+ PR c++/89532 - ICE with incomplete type in decltype.
+ * semantics.c (finish_compound_literal): Return error_mark_node
+ if digest_init_flags returns error_mark_node.
+
2019-03-01 Jakub Jelinek <jakub@redhat.com>
Implement P1002R1, Try-catch blocks in constexpr functions
compound_literal = digest_init_flags (type, compound_literal,
LOOKUP_NORMAL | LOOKUP_NO_NARROWING,
complain);
+ if (compound_literal == error_mark_node)
+ return error_mark_node;
+
/* If we're in a template, return the original compound literal. */
if (orig_cl)
{
+2019-03-01 Marek Polacek <polacek@redhat.com>
+
+ PR c++/89532 - ICE with incomplete type in decltype.
+ * g++.dg/cpp2a/nontype-class14.C: New test.
+
2019-03-01 Jakub Jelinek <jakub@redhat.com>
Implement P1002R1, Try-catch blocks in constexpr functions
--- /dev/null
+// PR c++/89532
+// { dg-do compile { target c++2a } }
+
+struct tuple;
+
+template <decltype(tuple {})> // { dg-error "invalid use of incomplete type" }
+struct S { };
+
+template<typename>
+decltype(tuple {}) d; // { dg-error "invalid use of incomplete type" }