From 496f8eead85efa20e9b17bca6039dde2b46f08c4 Mon Sep 17 00:00:00 2001 From: Kugan Vivekanandarajah Date: Mon, 10 Oct 2016 22:03:09 +0000 Subject: [PATCH] Allocate bitmap before copying Allocate bitmap before copying gcc/ChangeLog: 2016-10-11 Kugan Vivekanandarajah * tree-vrp.c (vrp_intersect_ranges_1): Allocate bitmap before copying. From-SVN: r240950 --- gcc/ChangeLog | 5 +++++ gcc/tree-vrp.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d5de3c3c3c2..cb330201c19 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-10-11 Kugan Vivekanandarajah + + * tree-vrp.c (vrp_intersect_ranges_1): Allocate bitmap before + copying. + 2016-10-10 Andreas Tobler * config.gcc: Add aarch64-*-freebsd* support. diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 4e7043122de..e82dffe6999 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -8622,7 +8622,10 @@ vrp_intersect_ranges_1 (value_range *vr0, value_range *vr1) if (vr0->equiv && vr1->equiv && vr0->equiv != vr1->equiv) bitmap_ior_into (vr0->equiv, vr1->equiv); else if (vr1->equiv && !vr0->equiv) - bitmap_copy (vr0->equiv, vr1->equiv); + { + vr0->equiv = BITMAP_ALLOC (&vrp_equiv_obstack); + bitmap_copy (vr0->equiv, vr1->equiv); + } } void -- 2.30.2