2014-06-02 Jason Merrill <jason@redhat.com>
+ PR c++/61046
+ * decl.c (reshape_init_class): Handle un-folded
+ constant-expressions.
+
PR c++/61134
* pt.c (pack_deducible_p): Handle canonicalization.
if (d->cur->index == error_mark_node)
return error_mark_node;
- if (TREE_CODE (d->cur->index) == INTEGER_CST)
+ if (TREE_CODE (d->cur->index) == FIELD_DECL)
+ /* We already reshaped this. */
+ gcc_assert (d->cur->index == field);
+ else if (TREE_CODE (d->cur->index) == IDENTIFIER_NODE)
+ field = lookup_field_1 (type, d->cur->index, /*want_type=*/false);
+ else
{
if (complain & tf_error)
error ("%<[%E] =%> used in a GNU-style designated initializer"
return error_mark_node;
}
- if (TREE_CODE (d->cur->index) == FIELD_DECL)
- /* We already reshaped this. */
- gcc_assert (d->cur->index == field);
- else
- field = lookup_field_1 (type, d->cur->index, /*want_type=*/false);
-
if (!field || TREE_CODE (field) != FIELD_DECL)
{
if (complain & tf_error)