public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/106661] New: possible uninitialized variable usage in store_bit_field_1 Date: Tue, 16 Aug 2022 23:59:04 +0000 [thread overview] Message-ID: <bug-106661-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106661 Bug ID: 106661 Summary: possible uninitialized variable usage in store_bit_field_1 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- Compiling the trunk with GCC 7.5.0 for a cross to riscv32-linux-gnu produces the following warning: In file included from /bajas/pinskia/src/toolchain-riscv/scripts/../src/gcc/coretypes.h:475:0, from /bajas/pinskia/src/toolchain-riscv/scripts/../src/gcc/expmed.cc:26: /bajas/pinskia/src/toolchain-riscv/scripts/../src/gcc/poly-int.h: In function ‘bool store_bit_field_1(rtx, poly_uint64, poly_uint64, poly_uint64, poly_uint64, machine_mode, rtx, bool, bool, bool)’: /bajas/pinskia/src/toolchain-riscv/scripts/../src/gcc/poly-int.h:1107:38: warning: ‘regnum’ may be used uninitialized in this function [-Wmaybe-uninitialized] POLY_SET_COEFF (C, r, i, NCa (a) * b.coeffs[i]); ^ /bajas/pinskia/src/toolchain-riscv/scripts/../src/gcc/expmed.cc:797:21: note: ‘regnum’ was declared here HOST_WIDE_INT regnum; ^~~~~~ I looked into the code I think the warning is correct, regnum could be uninitialized if undefined_p is true but constant_multiple_p returns false. I have not looked into if the warning happens for the trunk or why x86_64 does not get the warning.
next reply other threads:[~2022-08-16 23:59 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-08-16 23:59 pinskia at gcc dot gnu.org [this message] 2024-06-15 1:42 ` [Bug middle-end/106661] [11/12 regression] " sjames at gcc dot gnu.org 2024-06-15 1:46 ` pinskia at gcc dot gnu.org
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=bug-106661-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@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: linkBe 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).