- if (TREE_CODE (decl) == TREE_LIST)
- {
- tree absdcl = TREE_VALUE (decl);
- tree last_absdcl = NULL_TREE;
-
- if (current_function_decl
- && DECL_CONSTRUCTOR_P (current_function_decl))
- my_friendly_assert (immediate_size_expand == 0, 19990926);
-
- nelts = integer_one_node;
-
- if (absdcl && TREE_CODE (absdcl) == CALL_EXPR)
- abort ();
- while (absdcl && TREE_CODE (absdcl) == INDIRECT_REF)
- {
- last_absdcl = absdcl;
- absdcl = TREE_OPERAND (absdcl, 0);
- }
-
- if (absdcl && TREE_CODE (absdcl) == ARRAY_REF)
- {
- /* Probably meant to be a vec new. */
- tree this_nelts;
-
- while (TREE_OPERAND (absdcl, 0)
- && TREE_CODE (TREE_OPERAND (absdcl, 0)) == ARRAY_REF)
- {
- last_absdcl = absdcl;
- absdcl = TREE_OPERAND (absdcl, 0);
- }
-
- has_array = 1;
- this_nelts = TREE_OPERAND (absdcl, 1);
- if (this_nelts != error_mark_node)
- {
- if (this_nelts == NULL_TREE)
- error ("new of array type fails to specify size");
- else if (processing_template_decl)
- {
- nelts = this_nelts;
- absdcl = TREE_OPERAND (absdcl, 0);
- }
- else
- {
- if (build_expr_type_conversion (WANT_INT | WANT_ENUM,
- this_nelts, false)
- == NULL_TREE)
- pedwarn ("size in array new must have integral type");
-
- this_nelts = save_expr (cp_convert (sizetype, this_nelts));
- absdcl = TREE_OPERAND (absdcl, 0);
- if (this_nelts == integer_zero_node)
- {
- warning ("zero size array reserves no space");
- nelts = integer_zero_node;
- }
- else
- nelts = cp_build_binary_op (MULT_EXPR, nelts, this_nelts);
- }
- }
- else
- nelts = integer_zero_node;
- }
-
- if (last_absdcl)
- TREE_OPERAND (last_absdcl, 0) = absdcl;
- else
- TREE_VALUE (decl) = absdcl;
-
- type = groktypename (decl);
- if (! type || type == error_mark_node)
- return error_mark_node;
- }
- else if (TREE_CODE (decl) == IDENTIFIER_NODE)
- {
- if (IDENTIFIER_HAS_TYPE_VALUE (decl))
- {
- /* An aggregate type. */
- type = IDENTIFIER_TYPE_VALUE (decl);
- decl = TYPE_MAIN_DECL (type);
- }
- else
- {
- /* A builtin type. */
- decl = lookup_name (decl, 1);
- my_friendly_assert (TREE_CODE (decl) == TYPE_DECL, 215);
- type = TREE_TYPE (decl);
- }
- }
- else if (TREE_CODE (decl) == TYPE_DECL)
- {
- type = TREE_TYPE (decl);
- }
- else
- {
- type = decl;
- decl = TYPE_MAIN_DECL (type);
- }
-