summaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-15 11:27:54 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-15 11:27:54 +0000
commit55d6cb23109abfa35df107c0ce062004aa27da3b (patch)
tree7538d2aea0cd90810a9163d516331efefa21ef01 /gcc/cgraphunit.c
parentabb1d0886d8dbbe9df6680e83061d3a9f20a5699 (diff)
downloadgcc-55d6cb23109abfa35df107c0ce062004aa27da3b.tar.gz
2010-02-15 Richard Guenther <rguenther@suse.de>
PR middle-end/43068 * cgraphunit.c (thunk_adjust): Skip adjusting by fixed_offset if that is zero. * g++.dg/torture/pr43068.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156770 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 9cd5f16f488..ec7f9d8fc33 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1230,7 +1230,8 @@ thunk_adjust (gimple_stmt_iterator * bsi,
gimple stmt;
tree ret;
- if (this_adjusting)
+ if (this_adjusting
+ && fixed_offset != 0)
{
stmt = gimple_build_assign (ptr,
fold_build2_loc (input_location,
@@ -1315,7 +1316,8 @@ thunk_adjust (gimple_stmt_iterator * bsi,
offsettmp);
}
- if (!this_adjusting)
+ if (!this_adjusting
+ && fixed_offset != 0)
/* Adjust the pointer by the constant. */
{
tree ptrtmp;