public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/102327] New: gcc/config/i386/i386-expand.c:14678: Suspicious coding ?
@ 2021-09-14 15:00 dcb314 at hotmail dot com
  2021-09-14 15:01 ` [Bug target/102327] " dcb314 at hotmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2021-09-14 15:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102327

            Bug ID: 102327
           Summary: gcc/config/i386/i386-expand.c:14678: Suspicious coding
                    ?
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Static analyser cppcheck says:

gcc/config/i386/i386-expand.c:14678:8: style: Variable 'op1' is reassigned a
value before the old one has been used. [redundantAssignment]

Source code is

          /* Convert HFmode to HImode.  */
          op1 = gen_reg_rtx (HImode);
          op1 = gen_rtx_SUBREG (HImode, force_reg (HFmode, op), 0);

I don't know the code, but if the return value from gen_reg_rtx isn't
needed, then suggest don't assign it into op1.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-09-15 20:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 15:00 [Bug target/102327] New: gcc/config/i386/i386-expand.c:14678: Suspicious coding ? dcb314 at hotmail dot com
2021-09-14 15:01 ` [Bug target/102327] " dcb314 at hotmail dot com
2021-09-14 16:05 ` hjl.tools at gmail dot com
2021-09-15  1:10 ` crazylht at gmail dot com
2021-09-15  9:26 ` crazylht at gmail dot com
2021-09-15 10:49 ` cvs-commit at gcc dot gnu.org
2021-09-15 10:49 ` crazylht at gmail dot com
2021-09-15 20:39 ` pinskia at gcc dot gnu.org

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