diff options
author | Martin Liska <mliska@suse.cz> | 2017-02-13 14:13:21 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2017-02-13 13:13:21 +0000 |
commit | 765fc0f73ff5aba6565f3f73658ad518911ea53e (patch) | |
tree | 9c4c388c2c68bc259e6e1411008f3b14fed68fb4 | |
parent | f877b3adba2d9442752721d87c96f93beccd4c40 (diff) | |
download | gcc-765fc0f73ff5aba6565f3f73658ad518911ea53e.zip gcc-765fc0f73ff5aba6565f3f73658ad518911ea53e.tar.gz gcc-765fc0f73ff5aba6565f3f73658ad518911ea53e.tar.bz2 |
Replace XALLOCAVEC with XCNEWVEC (PR c/79471).
2017-02-13 Martin Liska <mliska@suse.cz>
PR c/79471
* calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC.
From-SVN: r245385
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/calls.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7ba091e..19c9e01 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-02-13 Martin Liska <mliska@suse.cz> + + PR c/79471 + * calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC. + 2017-02-13 Richard Biener <rguenther@suse.de> * configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS): diff --git a/gcc/calls.c b/gcc/calls.c index 7b45b9a..6d5ef4e 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -3262,8 +3262,7 @@ expand_call (tree exp, rtx target, int ignore) n_named_args = num_actuals; /* Make a vector to hold all the information about each arg. */ - args = XALLOCAVEC (struct arg_data, num_actuals); - memset (args, 0, num_actuals * sizeof (struct arg_data)); + args = XCNEWVEC (struct arg_data, num_actuals); /* Build up entries in the ARGS array, compute the size of the arguments into ARGS_SIZE, etc. */ @@ -4265,6 +4264,7 @@ expand_call (tree exp, rtx target, int ignore) currently_expanding_call--; free (stack_usage_map_buf); + free (args); /* Join result with returned bounds so caller may use them if needed. */ target = chkp_join_splitted_slot (target, valbnd); |