From: Aldy Hernandez Date: Thu, 3 Feb 2022 14:45:55 +0000 (+0100) Subject: ranger: fix small thinko in fur_list constructor X-Git-Tag: basepoints/gcc-13~1289 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f544e5efaf2747ee2add3d408cc2f216433ba617;p=thirdparty%2Fgcc.git ranger: fix small thinko in fur_list constructor The fur_list constructor for two ranges is leaving [1] in an undefined state. The reason we haven't noticed is because after all the shuffling in the last cycle there are no remaining users of it (similarly for fur_list(unsigned, irange *)). Since it's very late in the cycle, I would prefer to fix this, rather than removing unused constructors altogether. Besides, we have uses of them queued up for the next release. gcc/ChangeLog: * gimple-range-fold.cc (fur_list::fur_list): Set m_local[1] correctly. --- diff --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc index d70f6a2e8c88..5133a430f254 100644 --- a/gcc/gimple-range-fold.cc +++ b/gcc/gimple-range-fold.cc @@ -243,7 +243,7 @@ fur_list::fur_list (irange &r1, irange &r2) : fur_source (NULL) m_index = 0; m_limit = 2; m_local[0] = r1; - m_local[0] = r2; + m_local[1] = r2; } // Arbitrary number of ranges in a vector.