public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: Vineet Gupta <vineetg@rivosinc.com>, gcc-patches@gcc.gnu.org
Cc: kito.cheng@gmail.com, Palmer Dabbelt <palmer@rivosinc.com>,
	Robin Dapp <rdapp.gcc@gmail.com>,
	gnu-toolchain@rivosinc.com,
	Segher Boessenkool <segher@kernel.crashing.org>
Subject: Re: [PATCH 3/3] combine: initialize a local var
Date: Thu, 2 May 2024 14:38:12 -0600	[thread overview]
Message-ID: <f943cfc2-671a-4768-9d4c-d31e836b74e5@gmail.com> (raw)
In-Reply-To: <20240502185924.2060196-4-vineetg@rivosinc.com>



On 5/2/24 12:59 PM, Vineet Gupta wrote:
> This is no logic change (but technically still a functional change).
> 
> Ran into this when stepping thru combine code.
> @newpat has some random garbage for a bit until it is actually set.
> With the fix it remains 0 until actually set.
> 
> gcc/ChangeLog:
> 	* combine.cc (try_combine): Initialize newpat.
Isn't the same true even after this change if you turn on the optimizer? 
  And isn't the same true for many other objects that are initialized 
lazily?

Ultimately I'll defer to Segher on this.

jeff


  reply	other threads:[~2024-05-02 20:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02 18:59 [PATCH 0/3] Miscll fixlets Vineet Gupta
2024-05-02 18:59 ` [PATCH 1/3] docs: rtl: document GET_MODE_INNER Vineet Gupta
2024-05-02 20:36   ` Jeff Law
2024-05-02 20:48     ` [PATCH v2 " Vineet Gupta
2024-05-03 16:36       ` [Committed 1/2] " Vineet Gupta
2024-05-02 18:59 ` [PATCH 2/3] RISC-V: miscll comment fixes [NFC] Vineet Gupta
2024-05-02 20:36   ` Jeff Law
2024-05-03 16:37     ` [Committed 2/2] " Vineet Gupta
2024-05-02 18:59 ` [PATCH 3/3] combine: initialize a local var Vineet Gupta
2024-05-02 20:38   ` Jeff Law [this message]
2024-05-02 20:40     ` Vineet Gupta
2024-05-03  8:30     ` Segher Boessenkool
2024-05-03  8:26   ` Segher Boessenkool
2024-05-03 16:41     ` Vineet Gupta

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=f943cfc2-671a-4768-9d4c-d31e836b74e5@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gnu-toolchain@rivosinc.com \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@rivosinc.com \
    --cc=rdapp.gcc@gmail.com \
    --cc=segher@kernel.crashing.org \
    --cc=vineetg@rivosinc.com \
    /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).