public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Segher Boessenkool <segher@kernel.crashing.org>
To: Vineet Gupta <vineetg@rivosinc.com>
Cc: gcc-patches@gcc.gnu.org, Jeff Law <jeffreyalaw@gmail.com>,
	kito.cheng@gmail.com, Palmer Dabbelt <palmer@rivosinc.com>,
	Robin Dapp <rdapp.gcc@gmail.com>,
	gnu-toolchain@rivosinc.com
Subject: Re: [PATCH 3/3] combine: initialize a local var
Date: Fri, 3 May 2024 03:26:58 -0500	[thread overview]
Message-ID: <20240503082658.GU19790@gate.crashing.org> (raw)
In-Reply-To: <20240502185924.2060196-4-vineetg@rivosinc.com>

On Thu, May 02, 2024 at 11:59:24AM -0700, Vineet Gupta wrote:
> This is no logic change (but technically still a functional change).

Where are 1/3 and 2/3?  Or are those unrelated?  Please don't make
series like that.

> 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.

The same is true for all uninitialised variables.  Setting everything
to zero explicitly is a) quite a bit slower, and b) just as wrong!
For example, here, newpat should never be zero.  Never.  It does not
make any sense.

Is there any place where newpat is used uninitialised?


Segher

  parent reply	other threads:[~2024-05-03  8:27 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
2024-05-02 20:40     ` Vineet Gupta
2024-05-03  8:30     ` Segher Boessenkool
2024-05-03  8:26   ` Segher Boessenkool [this message]
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=20240503082658.GU19790@gate.crashing.org \
    --to=segher@kernel.crashing.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gnu-toolchain@rivosinc.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=kito.cheng@gmail.com \
    --cc=palmer@rivosinc.com \
    --cc=rdapp.gcc@gmail.com \
    --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).