+2019-01-21 Jason Merrill <jason@redhat.com>
+
+ PR c++/87893 - constexpr ctor ICE on ARM.
+ PR c++/88293 - ICE with comma expression.
+ * constexpr.c (initialized_type): Don't shortcut non-void type.
+ Handle COMPOUND_EXPR.
+ (cxx_eval_outermost_constant_expr): Return early for void type.
+
2019-01-21 Jakub Jelinek <jakub@redhat.com>
PR c++/88949
if (TYPE_P (t))
return t;
tree type = TREE_TYPE (t);
- if (!VOID_TYPE_P (type))
- /* No need to look deeper. */;
- else if (TREE_CODE (t) == CALL_EXPR)
+ if (TREE_CODE (t) == CALL_EXPR)
{
/* A constructor call has void type, so we need to look deeper. */
tree fn = get_function_named_in_call (t);
&& DECL_CXX_CONSTRUCTOR_P (fn))
type = DECL_CONTEXT (fn);
}
+ else if (TREE_CODE (t) == COMPOUND_EXPR)
+ return initialized_type (TREE_OPERAND (t, 1));
else if (TREE_CODE (t) == AGGR_INIT_EXPR)
type = TREE_TYPE (AGGR_INIT_EXPR_SLOT (t));
return cv_unqualified (type);
tree type = initialized_type (t);
tree r = t;
+ if (VOID_TYPE_P (type))
+ return t;
if (AGGREGATE_TYPE_P (type) || VECTOR_TYPE_P (type))
{
/* In C++14 an NSDMI can participate in aggregate initialization,