public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-7024] ranger: fix small thinko in fur_list constructor
Date: Thu,  3 Feb 2022 14:49:02 +0000 (GMT)	[thread overview]
Message-ID: <20220203144902.773AC3858402@sourceware.org> (raw)

https://gcc.gnu.org/g:f544e5efaf2747ee2add3d408cc2f216433ba617

commit r12-7024-gf544e5efaf2747ee2add3d408cc2f216433ba617
Author: Aldy Hernandez <aldyh@redhat.com>
Date:   Thu Feb 3 15:45:55 2022 +0100

    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:
---
 gcc/gimple-range-fold.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/gimple-range-fold.cc b/gcc/gimple-range-fold.cc
index d70f6a2e8c8..5133a430f25 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.


                 reply	other threads:[~2022-02-03 14:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220203144902.773AC3858402@sourceware.org \
    --to=aldyh@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).