From: Martin Liska Date: Fri, 13 Nov 2015 12:26:23 +0000 (+0100) Subject: re PR ipa/68311 (gcc/ipa-icf.c:3041: possible sequence point error ?) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c9ab724f84ee63a89e95a8b1995e30aed253d295;p=gcc.git 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 --- 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++) {