public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Vineet Gupta <vineetg@rivosinc.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
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 09:41:25 -0700	[thread overview]
Message-ID: <86765e51-9b57-422e-b6a4-59c7b9e8ca98@rivosinc.com> (raw)
In-Reply-To: <20240503082658.GU19790@gate.crashing.org>



On 5/3/24 01:26, Segher Boessenkool wrote:
> 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? 

Yes they were unrelated (minor doc fixes) hence didn't want to spam you,
but you are right just because they were piled up in my spring cleaning
branch doesn't mean I send them out that way.

> Please don't make series like that.

Noted for future.

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

As I mentioned this patch was the outcome of my "debugging" experience
and agree I should not conflate between what the compiler does and what
is needed to debug the compiler itself.

I've dropped this one.

Thx,
-Vineet

      reply	other threads:[~2024-05-03 16:41 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
2024-05-03 16:41     ` Vineet Gupta [this message]

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=86765e51-9b57-422e-b6a4-59c7b9e8ca98@rivosinc.com \
    --to=vineetg@rivosinc.com \
    --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=segher@kernel.crashing.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).