This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR rtl-optimization/68287


Hi.

There's a fix for fallout of r230027.

Patch can bootstrap and survives regression tests on x86_64-linux-gnu.

Ready for trunk?
Thanks,
Martin
>From 127d629991d92ea42a87b84e9d88612b84dbec03 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Wed, 11 Nov 2015 10:11:20 +0100
Subject: [PATCH 1/2] Fix PR rtl-optimization/68287

gcc/ChangeLog:

2015-11-11  Martin Liska  <mliska@suse.cz>

	PR rtl-optimization/68287
	* lra-lives.c (lra_create_live_ranges_1): Clear the vector
	with zeros.
---
 gcc/lra-lives.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c
index 9453759..27887de 100644
--- a/gcc/lra-lives.c
+++ b/gcc/lra-lives.c
@@ -1242,7 +1242,7 @@ lra_create_live_ranges_1 (bool all_p, bool dead_insn_p)
   curr_point = 0;
   unsigned new_length = get_max_uid () * 2;
   if (point_freq_vec.length () < new_length)
-    point_freq_vec.safe_grow (new_length);
+    point_freq_vec.safe_grow_cleared (new_length);
   lra_point_freq = point_freq_vec.address ();
   int *post_order_rev_cfg = XNEWVEC (int, last_basic_block_for_fn (cfun));
   int n_blocks_inverted = inverted_post_order_compute (post_order_rev_cfg);
-- 
2.6.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]