public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113206] New: [14] RISC-V rv64gcv vector: Runtime mismatch with rv64gc
@ 2024-01-02 19:08 patrick at rivosinc dot com
  2024-01-02 23:20 ` [Bug target/113206] " juzhe.zhong at rivai dot ai
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: patrick at rivosinc dot com @ 2024-01-02 19:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113206
           Summary: [14] RISC-V rv64gcv vector: Runtime mismatch with
                    rv64gc
           Product: gcc
           Version: 14.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:
signed char e;
short f = 8;
signed d;
int(g)(int o, int r) { return o & (o ^ -1) < 0 ? o : o - r; }
#pragma pack(1)
struct {
  short h;
  unsigned : 18;
  short i;
  long j;
  int k;
  char l;
  long m;
  int n;
} a, b, s, c, *p = &b, *u = &s, q = {1};
void t() {
  *p = a;
  for (; e > -7; e = g(e, 8))
    ;
  q = *u = c;
  for (; d - 3; d = 3)
    ;
}
int main() {
  t();
  if (f == 8)
    return 0;
  else
    return 1;
}

Commands:
rv64gcv:
> /scratch/tc-testing/tc-jan-1-trunk/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gcv -O3 red.c -o user-config.out
> QEMU_CPU=rv64,vlen=128,v=true,vext_spec=v1.0,Zve32f=true,Zve64f=true timeout --verbose -k 0.1 1 /scratch/tc-testing/tc-dec-22-trunk/build-rv64gcv/bin/qemu-riscv64 user-config.out
> echo $?
1

rv64gc:
> /scratch/tc-testing/tc-jan-1-trunk/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -march=rv64gc -O3 red.c -o user-config.out
> QEMU_CPU=rv64,vlen=128,v=true,vext_spec=v1.0,Zve32f=true,Zve64f=true timeout --verbose -k 0.1 1 /scratch/tc-testing/tc-dec-22-trunk/build-rv64gcv/bin/qemu-riscv64 user-config.out
> echo $?
0

Nothing touches f, so it should still be 8 after the function.

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

end of thread, other threads:[~2024-01-04 16:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-02 19:08 [Bug target/113206] New: [14] RISC-V rv64gcv vector: Runtime mismatch with rv64gc patrick at rivosinc dot com
2024-01-02 23:20 ` [Bug target/113206] " juzhe.zhong at rivai dot ai
2024-01-02 23:26 ` patrick at rivosinc dot com
2024-01-03  1:15 ` juzhe.zhong at rivai dot ai
2024-01-04  0:33 ` cvs-commit at gcc dot gnu.org
2024-01-04  0:47 ` juzhe.zhong at rivai dot ai
2024-01-04  1:36 ` patrick at rivosinc dot com
2024-01-04  2:32 ` patrick at rivosinc dot com
2024-01-04  3:46 ` juzhe.zhong at rivai dot ai
2024-01-04 16:44 ` patrick at rivosinc dot com

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