public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/114733] New: [14] Miscompile with -march=rv64gcv -O3 on riscv
@ 2024-04-16  4:30 patrick at rivosinc dot com
  2024-04-16  7:44 ` [Bug middle-end/114733] " rdapp at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: patrick at rivosinc dot com @ 2024-04-16  4:30 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114733
           Summary: [14] Miscompile with -march=rv64gcv -O3 on riscv
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patrick at rivosinc dot com
  Target Milestone: ---

Testcase:
long b = 1;
signed char c;
int d[25];
int main() {
  for (signed char g = 0; g < 8; g += 1)
    for (short h = 0; h < 25; h += 2) {
      b *= -1;
      c ^= d[h];
    }
  __builtin_printf("%ld\n", b);
}

Commands:
> /scratch/tc-testing/tc-apr-15/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O3 red.c -o red.out
> /scratch/tc-testing/tc-apr-15/build-rv64gcv/bin/qemu-riscv64 red.out
-1
> /scratch/tc-testing/tc-apr-15/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc red.c -o red.out
> /scratch/tc-testing/tc-apr-15/build-rv64gcv/bin/qemu-riscv64 red.out
1

This testcase looks extremely similar to pr114485 so they are likely related -
from my testing pr114485 has NOT regressed.

Tested using r14-9976-gf8409c3109d (not bisected)

Found via fuzzer.

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

end of thread, other threads:[~2024-05-03 13:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-16  4:30 [Bug middle-end/114733] New: [14] Miscompile with -march=rv64gcv -O3 on riscv patrick at rivosinc dot com
2024-04-16  7:44 ` [Bug middle-end/114733] " rdapp at gcc dot gnu.org
2024-04-16  8:08 ` rguenth at gcc dot gnu.org
2024-04-16  8:43 ` rguenth at gcc dot gnu.org
2024-04-16 10:37 ` cvs-commit at gcc dot gnu.org
2024-04-16 10:39 ` [Bug middle-end/114733] [13 Regression] " 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

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