public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "patrick at rivosinc dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/116318] New: RISC-V: Miscompile at -O1 with -fwhole-program Date: Fri, 09 Aug 2024 23:56:29 +0000 [thread overview] Message-ID: <bug-116318-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116318 Bug ID: 116318 Summary: RISC-V: Miscompile at -O1 with -fwhole-program Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: patrick at rivosinc dot com Target Milestone: --- Testcase: int a, c, d; short b[][8] = {}; int main() { for (; d < 7; d++) { a = b[d][c]; __builtin_printf("%lX\n", a ^ 4095UL); } } Commands: > /scratch/tc-testing/tc-compiler-fuzz-trunk/build-gcv/bin/riscv64-unknown-linux-gnu-gcc -fwhole-program -O1 preprocessed.c -o test.o > /scratch/tc-testing/tc-compiler-fuzz-trunk/build-gcv/bin/qemu-riscv64 test.o 14FE FC3 F97 75FC FE7 FEB FFF > /scratch/tc-testing/tc-compiler-fuzz-trunk/build-gcv/bin/riscv64-unknown-linux-gnu-gcc -fwhole-program -O0 preprocessed.c -o test.o > /scratch/tc-testing/tc-compiler-fuzz-trunk/build-gcv/bin/qemu-riscv64 test.o FFF FFF FFF FFF FFF FFF FFF Found via fuzzer.
next reply other threads:[~2024-08-09 23:56 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-08-09 23:56 patrick at rivosinc dot com [this message] 2024-08-09 23:59 ` [Bug target/116318] " andrew at sifive dot com 2024-08-10 0:02 ` patrick at rivosinc dot com
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-116318-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).