From c9ab724f84ee63a89e95a8b1995e30aed253d295 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 13 Nov 2015 13:26:23 +0100 Subject: [PATCH] re PR ipa/68311 (gcc/ipa-icf.c:3041: possible sequence point error ?) Fix PR ipa/68311 PR ipa/68311 * ipa-icf.c (sem_item_optimizer::traverse_congruence_split): Replace ctor with auto_vec and initialization in a loop. From-SVN: r230311 --- gcc/ChangeLog | 6 ++++++ gcc/ipa-icf.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1b16e12fe8a..fde5bef6522 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-11-13 Martin Liska + + PR ipa/68311 + * ipa-icf.c (sem_item_optimizer::traverse_congruence_split): + Replace ctor with auto_vec and initialization in a loop. + 2015-11-13 Richard Biener PR tree-optimization/68306 diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c index b6a97c3e122..bf1acae2310 100644 --- a/gcc/ipa-icf.c +++ b/gcc/ipa-icf.c @@ -3046,7 +3046,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 newclasses; + newclasses.quick_push (new congruence_class (class_id++)); + newclasses.quick_push (new congruence_class (class_id++)); for (unsigned int i = 0; i < cls->members.length (); i++) { -- 2.30.2