aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-02-15 11:27:54 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-02-15 11:27:54 +0000
commit313333a6d4a764968406c2d7e59ff92f7676aa6f (patch)
tree7538d2aea0cd90810a9163d516331efefa21ef01 /gcc/cgraphunit.c
parentff78880a17ca1412a232d5e8d3b41aa64d08a31f (diff)
downloadgcc-313333a6d4a764968406c2d7e59ff92f7676aa6f.zip
gcc-313333a6d4a764968406c2d7e59ff92f7676aa6f.tar.gz
gcc-313333a6d4a764968406c2d7e59ff92f7676aa6f.tar.bz2
re PR tree-optimization/43068 (ICE: in estimate_operator_cost, at tree-inline.c:3141 with -freorder-blocks -ftracer)
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. From-SVN: r156770
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 9cd5f16..ec7f9d8 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;