aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2005-09-18 14:15:19 +0000
committerRichard Guenther <rguenther@suse.de>2005-09-18 14:15:19 +0000
commit7bec2bef9bd80301fc7d356a1b7567f3dd6393ad (patch)
tree953b48456a86b4d54570210cc6eb4df7472f616f /gcc/gimplify.c
parent42b28eff26ef3013921ef8561c91384fcb1e9766 (diff)
2005-09-18 Richard Guenther <rguenther@suse.de>
PR middle-end/23944 * gimplify.c (fold_indirect_ref_rhs): Fix thinko in fallback. * gcc.c-torture/compile/pr23944.c: New testcase. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@104402 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index cdb8a33e46d..cba1704e8a0 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -2950,9 +2950,10 @@ fold_indirect_ref_rhs (tree t)
{
tree type_domain;
tree min_val = size_zero_node;
+ tree osub = sub;
sub = fold_indirect_ref_rhs (sub);
if (! sub)
- sub = build1 (INDIRECT_REF, TREE_TYPE (subtype), sub);
+ sub = build1 (INDIRECT_REF, TREE_TYPE (subtype), osub);
type_domain = TYPE_DOMAIN (TREE_TYPE (sub));
if (type_domain && TYPE_MIN_VALUE (type_domain))
min_val = TYPE_MIN_VALUE (type_domain);