aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2015-01-27 10:21:26 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2015-01-27 10:21:26 +0100
commit4eaf52aabba9299e6642ac1e88de0b56f0a81908 (patch)
treeb999fd1897f593f0dc1e065cfb542877cee19155 /gcc
parent6d71672db616f6d3f5462028d6476a28610f42b5 (diff)
downloadgcc-4eaf52aabba9299e6642ac1e88de0b56f0a81908.zip
gcc-4eaf52aabba9299e6642ac1e88de0b56f0a81908.tar.gz
gcc-4eaf52aabba9299e6642ac1e88de0b56f0a81908.tar.bz2
re PR ipa/64776 (FAIL: gcc.dg/ipa/pr64307.c (internal compiler error) on x86_64-apple-darwin14)
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. From-SVN: r220156
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/cgraphunit.c14
2 files changed, 13 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 57f5efe..2f4e525 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2015-01-27 Jakub Jelinek <jakub@redhat.com>
+ 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 1ef1b6c..bde3e42 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<tree> 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))