From dcf92453c80642d3b98252f21a64ce8277cca8c5 Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Sun, 13 Apr 2003 01:45:35 +0000 Subject: tree.c (build_constructor): New function. * tree.c (build_constructor): New function. * tree.h: Prototype it. * c-typeck.c (build_c_cast, pop_init_level) * profile.c (build_function_info_value, build_gcov_info_value) (create_profiler): Use build_constructor. * builtins.c (expand_builtin_args_info): Remove #if 0 blocks. * objc/objc-act.c (build_constructor): Rename objc_build_constructor. Use build_constructor. (build_objc_string_object, objc_add_static_instance) (init_def_list, init_objc_symtab, init_module_descriptor) (generate_static_references, build_selector_translation_table) (build_descriptor_table_initializer, generate_descriptor_table) (build_protocol_initializer, build_ivar_list_initializer) (generate_ivars_list, build_dispatch_table_initializer) (generate_dispatch_table, generate_protocol_list) (build_category_initializer, build_shared_structure_initializer): Update to match. ada: * gigi.h, utils2.c (build_constructor): Rename gnat_build_constructor. Use build_constructor. * decl.c (gnat_to_gnu_entity) * trans.c (tree_transform, pos_to_constructor, extract_values) * ada/utils.c (build_template, convert_to_fat_pointer, convert) (unchecked_convert) * ada/utils2.c (build_binary_op, build_call_raise, build_allocator) (fill_vms_descriptor): Update to match. cp: * class.c (initialize_array) * decl.c (reshape_init) * decl2.c (build_expr_from_tree) * init.c (build_zero_init) * pt.c (tsubst_copy, tsubst_copy_and_build) * rtti.c (tinfo_base_init, generic_initializer, ptr_initializer) (ptm_initializer, class_initializer, get_pseudo_ti_init) * semantics.c (finish_compound_literal) * typeck.c (build_ptrmemfunc1) * typeck2.c (store_init_value, process_init_constructor) (build_functional_cast): Use build_constructor. f: * com.c (ffecom_build_complex_constant_, ffecom_expr_) (ffecom_init_zero_, ffecom_transform_namelist_, ffecom_vardesc_) (ffecom_vardesc_array_, ffecom_vardesc_dims_, ffecom_2) * ste.c (ffeste_io_ialist_, ffeste_io_cilist_, ffeste_io_cllist_) (ffeste_io_icilist_, ffeste_io_inlist_, ffeste_io_olist_): Use build_constructor. java: * class.c (make_field_value, make_method_value, get_dispatch_table) (make_class_data, emit_offset_symbol_table) * constants.c (build_constants_constructor) * java-tree.h (START_RECORD_CONSTRUCTOR) * parse.y (maybe_build_array_element_wfl): Use build_constructor. From-SVN: r65539 --- gcc/f/ChangeLog | 9 +++++++++ gcc/f/com.c | 18 +++++++++--------- gcc/f/ste.c | 12 ++++++------ 3 files changed, 24 insertions(+), 15 deletions(-) (limited to 'gcc/f') diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index d6ff719..fc712ff 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,12 @@ +2003-04-12 Zack Weinberg + + * com.c (ffecom_build_complex_constant_, ffecom_expr_) + (ffecom_init_zero_, ffecom_transform_namelist_, ffecom_vardesc_) + (ffecom_vardesc_array_, ffecom_vardesc_dims_, ffecom_2) + * ste.c (ffeste_io_ialist_, ffeste_io_cilist_, ffeste_io_cllist_) + (ffeste_io_icilist_, ffeste_io_inlist_, ffeste_io_olist_): + Use build_constructor. + 2003-04-11 Bud Davis PR Fortran/9263 diff --git a/gcc/f/com.c b/gcc/f/com.c index b63e2ea..1ccaeb2 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -1287,7 +1287,7 @@ ffecom_build_complex_constant_ (tree type, tree realpart, tree imagpart) { bothparts = build_tree_list (TYPE_FIELDS (type), realpart); TREE_CHAIN (bothparts) = build_tree_list (TREE_CHAIN (TYPE_FIELDS (type)), imagpart); - bothparts = build (CONSTRUCTOR, type, NULL_TREE, bothparts); + bothparts = build_constructor (type, bothparts); } else { @@ -3027,7 +3027,7 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest, build_range_type (ffecom_integer_type_node, ffecom_integer_zero_node, item)); - list = build (CONSTRUCTOR, item, NULL_TREE, list); + list = build_constructor (item, list); TREE_CONSTANT (list) = 1; TREE_STATIC (list) = 1; return list; @@ -3075,7 +3075,7 @@ ffecom_expr_ (ffebld expr, tree dest_tree, ffebld dest, build_range_type (ffecom_integer_type_node, ffecom_integer_zero_node, item)); - list = build (CONSTRUCTOR, item, NULL_TREE, list); + list = build_constructor (item, list); TREE_CONSTANT (list) = 1; TREE_STATIC (list) = 1; return list; @@ -6302,7 +6302,7 @@ ffecom_init_zero_ (tree decl) init = convert (type, integer_zero_node); else if (!incremental) { - init = build (CONSTRUCTOR, type, NULL_TREE, NULL_TREE); + init = build_constructor (type, NULL_TREE); TREE_CONSTANT (init) = 1; TREE_STATIC (init) = 1; } @@ -8761,7 +8761,7 @@ ffecom_transform_namelist_ (ffesymbol s) TREE_CHAIN (TREE_CHAIN (nmlinits)) = build_tree_list ((field = TREE_CHAIN (field)), nvarsinit); - nmlinits = build (CONSTRUCTOR, nmltype, NULL_TREE, nmlinits); + nmlinits = build_constructor (nmltype, nmlinits); TREE_CONSTANT (nmlinits) = 1; TREE_STATIC (nmlinits) = 1; @@ -9296,7 +9296,7 @@ ffecom_vardesc_ (ffebld expr) TREE_CHAIN (TREE_CHAIN (TREE_CHAIN (varinits))) = build_tree_list ((field = TREE_CHAIN (field)), typeinit); - varinits = build (CONSTRUCTOR, vardesctype, NULL_TREE, varinits); + varinits = build_constructor (vardesctype, varinits); TREE_CONSTANT (varinits) = 1; TREE_STATIC (varinits) = 1; @@ -9341,7 +9341,7 @@ ffecom_vardesc_array_ (ffesymbol s) build_range_type (integer_type_node, integer_one_node, build_int_2 (i, 0))); - list = build (CONSTRUCTOR, item, NULL_TREE, list); + list = build_constructor (item, list); TREE_CONSTANT (list) = 1; TREE_STATIC (list) = 1; @@ -9447,7 +9447,7 @@ ffecom_vardesc_dims_ (ffesymbol s) build_int_2 ((int) ffesymbol_rank (s) + 2, 0))); - list = build (CONSTRUCTOR, item, NULL_TREE, numdim); + list = build_constructor (item, numdim); TREE_CONSTANT (list) = 1; TREE_STATIC (list) = 1; @@ -9582,7 +9582,7 @@ ffecom_2 (enum tree_code code, tree type, tree node1, case COMPLEX_EXPR: item = build_tree_list (TYPE_FIELDS (type), node1); TREE_CHAIN (item) = build_tree_list (TREE_CHAIN (TYPE_FIELDS (type)), node2); - item = build (CONSTRUCTOR, type, NULL_TREE, item); + item = build_constructor (type, item); break; case PLUS_EXPR: diff --git a/gcc/f/ste.c b/gcc/f/ste.c index 7d625cb..a1f355b 100644 --- a/gcc/f/ste.c +++ b/gcc/f/ste.c @@ -1231,7 +1231,7 @@ ffeste_io_ialist_ (bool have_err, initn = inits; ffeste_f2c_init_next_ (unitinit); - inits = build (CONSTRUCTOR, f2c_alist_struct, NULL_TREE, inits); + inits = build_constructor (f2c_alist_struct, inits); TREE_CONSTANT (inits) = constantp ? 1 : 0; TREE_STATIC (inits) = 1; @@ -1434,7 +1434,7 @@ ffeste_io_cilist_ (bool have_err, ffeste_f2c_init_next_ (formatinit); ffeste_f2c_init_next_ (recinit); - inits = build (CONSTRUCTOR, f2c_cilist_struct, NULL_TREE, inits); + inits = build_constructor (f2c_cilist_struct, inits); TREE_CONSTANT (inits) = constantp ? 1 : 0; TREE_STATIC (inits) = 1; @@ -1561,7 +1561,7 @@ ffeste_io_cllist_ (bool have_err, ffeste_f2c_init_next_ (unitinit); ffeste_f2c_init_next_ (statinit); - inits = build (CONSTRUCTOR, f2c_close_struct, NULL_TREE, inits); + inits = build_constructor (f2c_close_struct, inits); TREE_CONSTANT (inits) = constantp ? 1 : 0; TREE_STATIC (inits) = 1; @@ -1766,7 +1766,7 @@ ffeste_io_icilist_ (bool have_err, ffeste_f2c_init_next_ (unitleninit); ffeste_f2c_init_next_ (unitnuminit); - inits = build (CONSTRUCTOR, f2c_icilist_struct, NULL_TREE, inits); + inits = build_constructor (f2c_icilist_struct, inits); TREE_CONSTANT (inits) = constantp ? 1 : 0; TREE_STATIC (inits) = 1; @@ -2013,7 +2013,7 @@ ffeste_io_inlist_ (bool have_err, ffeste_f2c_init_next_ (blankinit); ffeste_f2c_init_next_ (blankleninit); - inits = build (CONSTRUCTOR, f2c_inquire_struct, NULL_TREE, inits); + inits = build_constructor (f2c_inquire_struct, inits); TREE_CONSTANT (inits) = constantp ? 1 : 0; TREE_STATIC (inits) = 1; @@ -2189,7 +2189,7 @@ ffeste_io_olist_ (bool have_err, ffeste_f2c_init_next_ (reclinit); ffeste_f2c_init_next_ (blankinit); - inits = build (CONSTRUCTOR, f2c_open_struct, NULL_TREE, inits); + inits = build_constructor (f2c_open_struct, inits); TREE_CONSTANT (inits) = constantp ? 1 : 0; TREE_STATIC (inits) = 1; -- cgit v1.1