diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-13 18:46:25 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-13 18:46:25 +0000 |
commit | 414c3a2c02971657abc9539eb7db6c7a7c03d9b5 (patch) | |
tree | 435ae90e4b6eed76766475f3f0c7083b8c6f6502 /gcc/stor-layout.c | |
parent | 4bf69bc330c9edac62fdfa43cc7d3a179ad9e604 (diff) | |
download | gcc-414c3a2c02971657abc9539eb7db6c7a7c03d9b5.tar.gz |
gcc/
* tree.h (build_function_call_expr): Delete.
(build_call_expr_loc_array): New function.
(build_call_expr_loc_vec): New function.
* tree-flow.h (struct omp_region): Change type of ws_args field
to a VEC.
* builtins.c (build_function_call_expr): Delete.
(build_call_expr_loc_array): New function.
(build_call_expr_loc): Call it. Use XALLOCAVEC.
(build_call_expr): Likewise.
(build_call_expr_loc_vec): New function.
* cgraphunit.c (build_cdtor): Call build_call_expr instead of
build_function_call_expr.
* expr.c (emutls_var_address): Likewise.
* varasm.c (emutls_common_1): Likewise.
* omp-low.c (expand_omp_atomic_mutex): Likewise.
(expand_omp_taskreg): Adjust for new type of region->ws_args.
(get_ws_args_for): Return a VEC instead of a tree.
(expand_parallel_call): Call build_call_expr_loc_vec instead of
build_function_call_expr.
* stor-layout.c (self_referential_size): Likewise.
gcc/fortran/
* trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
instead of build_function_call_expr.
* trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162148 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 0d77159d9b3..8d3c7526737 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -234,10 +234,11 @@ self_referential_size (tree size) { static unsigned HOST_WIDE_INT fnno = 0; VEC (tree, heap) *self_refs = NULL; - tree param_type_list = NULL, param_decl_list = NULL, arg_list = NULL; + tree param_type_list = NULL, param_decl_list = NULL; tree t, ref, return_type, fntype, fnname, fndecl; unsigned int i; char buf[128]; + VEC(tree,gc) *args = NULL; /* Do not factor out simple operations. */ t = skip_simple_arithmetic (size); @@ -256,6 +257,7 @@ self_referential_size (tree size) /* Build the parameter and argument lists in parallel; also substitute the former for the latter in the expression. */ + args = VEC_alloc (tree, gc, VEC_length (tree, self_refs)); for (i = 0; VEC_iterate (tree, self_refs, i, ref); i++) { tree subst, param_name, param_type, param_decl; @@ -291,7 +293,7 @@ self_referential_size (tree size) param_type_list = tree_cons (NULL_TREE, param_type, param_type_list); param_decl_list = chainon (param_decl, param_decl_list); - arg_list = tree_cons (NULL_TREE, ref, arg_list); + VEC_quick_push (tree, args, ref); } VEC_free (tree, heap, self_refs); @@ -302,7 +304,6 @@ self_referential_size (tree size) /* The 3 lists have been created in reverse order. */ param_type_list = nreverse (param_type_list); param_decl_list = nreverse (param_decl_list); - arg_list = nreverse (arg_list); /* Build the function type. */ return_type = TREE_TYPE (size); @@ -343,7 +344,7 @@ self_referential_size (tree size) VEC_safe_push (tree, gc, size_functions, fndecl); /* Replace the original expression with a call to the size function. */ - return build_function_call_expr (UNKNOWN_LOCATION, fndecl, arg_list); + return build_call_expr_loc_vec (input_location, fndecl, args); } /* Take, queue and compile all the size functions. It is essential that |