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 tree-optimization/114485] New: [14] Wrong code with -O3 -march=rv64gcv on riscv Date: Tue, 26 Mar 2024 14:54:35 +0000 [thread overview] Message-ID: <bug-114485-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114485 Bug ID: 114485 Summary: [14] Wrong code with -O3 -march=rv64gcv on riscv Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: patrick at rivosinc dot com Target Milestone: --- Testcase: int b, c = 8, d; int e[23]; int main() { int *h = e; for (int i = 1; i < b + 21; i += 2) { c *= -1; d = h[i] ? i : 0; } __builtin_printf("%u\n", c); } Commands > /scratch/tc-testing/tc-mar-25/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O3 red.c -o red.out > /scratch/tc-testing/tc-mar-25/build-rv64gcv/bin/qemu-riscv64 red.out 4294967288 > /scratch/tc-testing/tc-mar-25/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O2 red.c -o red.out > /scratch/tc-testing/tc-mar-25/build-rv64gcv/bin/qemu-riscv64 red.out 8 This is likely a duplicate of pr114476 (but this testcase does not require -fwrapv). Found via fuzzer
next reply other threads:[~2024-03-26 14:54 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-26 14:54 patrick at rivosinc dot com [this message] 2024-03-26 20:35 ` [Bug tree-optimization/114485] " pinskia at gcc dot gnu.org 2024-03-26 20:39 ` [Bug tree-optimization/114485] [13/14 Regression] Wrong code with -O3 -march=rv64gcv on riscv or `-O3 -march=armv9-a` for aarch64 pinskia at gcc dot gnu.org 2024-03-27 8:19 ` rguenth at gcc dot gnu.org 2024-03-27 8:19 ` rguenth at gcc dot gnu.org 2024-03-27 14:06 ` rdapp at gcc dot gnu.org 2024-03-27 21:03 ` pinskia at gcc dot gnu.org 2024-03-27 21:04 ` pinskia at gcc dot gnu.org 2024-03-27 21:06 ` pinskia at gcc dot gnu.org 2024-04-03 13:13 ` rguenth at gcc dot gnu.org 2024-04-04 7:52 ` rguenth at gcc dot gnu.org 2024-04-04 7:59 ` rguenth at gcc dot gnu.org 2024-04-04 8:04 ` rguenth at gcc dot gnu.org 2024-04-04 11:09 ` cvs-commit at gcc dot gnu.org 2024-04-04 11:10 ` [Bug tree-optimization/114485] [13 " rguenth at gcc dot gnu.org 2024-05-03 13:55 ` cvs-commit at gcc dot gnu.org 2024-05-03 13:58 ` rguenth 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-114485-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).