aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9
diff options
context:
space:
mode:
authorYiran Wang <yiran@google.com>2015-08-10 22:43:11 (GMT)
committerYiran Wang <yiran@google.com>2015-08-10 22:56:21 (GMT)
commit03b6a78251eda8afb4474eda2d911497b6ec7ec7 (patch)
treee1e070cc8e57fcdb12011a8d6518694163133e54 /gcc-4.9
parent2a6be47f38e074f4e261b21191e2379050ec05ab (diff)
downloadtoolchain_gcc-03b6a78251eda8afb4474eda2d911497b6ec7ec7.zip
toolchain_gcc-03b6a78251eda8afb4474eda2d911497b6ec7ec7.tar.gz
toolchain_gcc-03b6a78251eda8afb4474eda2d911497b6ec7ec7.tar.bz2
fix a bug in 6278c3db6b4eb6f38ccd27c1227452ad9915db28
After call to pointer_map_insert, the caller need to write the value. This fixes the following regression, gfortran.dg/array_constructor_6.f90 gfortran.dg/subref_array_pointer_2.f90 Change-Id: Ic7aec96c24d17c527291aefe30e726989ecd9a8f
Diffstat (limited to 'gcc-4.9')
-rw-r--r--gcc-4.9/gcc/tree-inline.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc-4.9/gcc/tree-inline.c b/gcc-4.9/gcc/tree-inline.c
index 49f897c..aa5d0f1 100644
--- a/gcc-4.9/gcc/tree-inline.c
+++ b/gcc-4.9/gcc/tree-inline.c
@@ -800,8 +800,12 @@ remap_dependence_clique (copy_body_data *id, unsigned short clique)
void **newc = pointer_map_contains (id->dependence_map,
(void *)(uintptr_t)clique);
if (!newc)
- newc = pointer_map_insert (id->dependence_map,
- (void *)(uintptr_t)++cfun->last_clique);
+ {
+ newc = pointer_map_insert (id->dependence_map,
+ (void *)(uintptr_t)clique);
+ *newc = (void *)(uintptr_t)++cfun->last_clique;
+ }
+
return (uintptr_t)*newc;
}