From 5fa209c450c82a7ef372ea3a530a693a5d9cfabc Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Fri, 19 Sep 2008 00:49:58 +0000 Subject: [PATCH] - BugFix: transform_polymorph_Load() returns the original load, not NULL - removed useless code [r22109] --- ir/opt/ldstopt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ir/opt/ldstopt.c b/ir/opt/ldstopt.c index 253b3effb..489e2a84b 100644 --- a/ir/opt/ldstopt.c +++ b/ir/opt/ldstopt.c @@ -410,7 +410,6 @@ ptr_arith: for (ent = field;;) { unsigned size; tarval *sz, *tv_index, *tlower, *tupper; - long index; ir_node *bound; tp = get_entity_type(ent); @@ -441,7 +440,6 @@ ptr_arith: return NULL; /* ok, bounds check finished */ - index = get_tarval_long(tv_index); ++idx; } if (! tarval_is_null(tv)) { @@ -1038,7 +1036,8 @@ static unsigned optimize_load(ir_node *load) /* Load from a constant polymorphic field, where we can resolve polymorphism. */ value = transform_polymorph_Load(load); - if (value == NULL) { + if (value == load) { + value = NULL; /* check if we can determine the entity that will be loaded */ ent = find_constant_entity(ptr); if (ent != NULL) { -- 2.20.1