From 8c2b231e0ea1b3af65bb1bccc97d15c36b0df170 Mon Sep 17 00:00:00 2001 From: jakub Date: Tue, 27 Jan 2015 09:21:26 +0000 Subject: [PATCH] PR ipa/64776 * cgraphunit.c (cgraph_node::expand_thunk): If not this_adjusting, handle the first argument in the same loop as all the other arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220156 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/cgraphunit.c | 14 +++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 57f5efe08fb..2f4e5255e23 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2015-01-27 Jakub Jelinek + PR ipa/64776 + * cgraphunit.c (cgraph_node::expand_thunk): If not this_adjusting, + handle the first argument in the same loop as all the other arguments. + PR rtl-optimization/61058 * jump.c (cleanup_barriers): Update basic block boundaries if BLOCK_FOR_INSN is non-NULL on PREV. diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index 1ef1b6c648d..bde3e420a71 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -1610,14 +1610,18 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk) for (arg = a; arg; arg = DECL_CHAIN (arg)) nargs++; auto_vec vargs (nargs); + i = 0; + arg = a; if (this_adjusting) - vargs.quick_push (thunk_adjust (&bsi, a, 1, fixed_offset, - virtual_offset)); - else if (nargs) - vargs.quick_push (a); + { + vargs.quick_push (thunk_adjust (&bsi, a, 1, fixed_offset, + virtual_offset)); + arg = DECL_CHAIN (a); + i = 1; + } if (nargs) - for (i = 1, arg = DECL_CHAIN (a); i < nargs; i++, arg = DECL_CHAIN (arg)) + for (; i < nargs; i++, arg = DECL_CHAIN (arg)) { tree tmp = arg; if (!is_gimple_val (arg)) -- 2.11.4.GIT