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 ipa/68311


Hello.

Following patch fixes PR68311, can regbootstrap on x86_64-linux-gnu.

Ready for trunk?
Thanks,
Martin
>From bc07c0709f0601e18b7ea7dfad867a5296378640 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Thu, 12 Nov 2015 16:17:52 +0100
Subject: [PATCH] Fix PR ipa/68311

gcc/ChangeLog:

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

	PR ipa/68311
	* ipa-icf.c (sem_item_optimizer::traverse_congruence_split):
	Replace ctor with auto_vec and initialization in a loop.
---
 gcc/ipa-icf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
index 7bb3af5..97702c9 100644
--- a/gcc/ipa-icf.c
+++ b/gcc/ipa-icf.c
@@ -3038,7 +3038,9 @@ sem_item_optimizer::traverse_congruence_split (congruence_class * const &cls,
 
   if (popcount > 0 && popcount < cls->members.length ())
     {
-      congruence_class* newclasses[2] = { new congruence_class (class_id++), new congruence_class (class_id++) };
+      auto_vec <congruence_class *> newclasses (2);
+      newclasses.safe_push (new congruence_class (class_id++));
+      newclasses.safe_push (new congruence_class (class_id++));
 
       for (unsigned int i = 0; i < cls->members.length (); i++)
 	{
-- 
2.6.2


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