public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/111545] New: [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error
@ 2023-09-22 22:31 ewlu at rivosinc dot com
  2023-09-22 22:32 ` [Bug target/111545] " ewlu at rivosinc dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ewlu at rivosinc dot com @ 2023-09-22 22:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111545
           Summary: [14 Regression] RISC-V
                    gfortran.dg/host_assoc_function_7.f09 Illegal
                    instruction error
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ewlu at rivosinc dot com
  Target Milestone: ---

Created attachment 55970
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55970&action=edit
objdump of executable on first bad hash

First bad hash
r14-4188-g66c13521f56

glibc rv64gcv encounters an illegal instruction error on qemu version 8.1.0. 

GDB backtrace:

Program received signal SIGILL, Illegal instruction.
0x0000000000010af4 in __sa0054_stuff_MOD_sa0054 ()
(gdb) bt
#0  0x0000000000010af4 in __sa0054_stuff_MOD_sa0054 ()
#1  0x0000000000010ee4 in MAIN__ ()
#2  0x00000000000106c8 in main ()

Included the objdump of the executable as objdump_bad.txt. Tested the
instruction using the previous hash r14-4187-g4907d220bee and it successfully
executed the vfmv.v.f instruction.


Additional targets affected: glibc rv32gcv (objdump not included)

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

* [Bug target/111545] [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error
  2023-09-22 22:31 [Bug target/111545] New: [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error ewlu at rivosinc dot com
@ 2023-09-22 22:32 ` ewlu at rivosinc dot com
  2023-09-22 23:10 ` juzhe.zhong at rivai dot ai
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ewlu at rivosinc dot com @ 2023-09-22 22:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Edwin Lu <ewlu at rivosinc dot com> ---
Created attachment 55971
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55971&action=edit
objdump of executable on good hash

Here is the objdump of the executable created using the good hash
r14-4187-g4907d220bee

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

* [Bug target/111545] [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error
  2023-09-22 22:31 [Bug target/111545] New: [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error ewlu at rivosinc dot com
  2023-09-22 22:32 ` [Bug target/111545] " ewlu at rivosinc dot com
@ 2023-09-22 23:10 ` juzhe.zhong at rivai dot ai
  2023-09-22 23:31 ` ewlu at rivosinc dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: juzhe.zhong at rivai dot ai @ 2023-09-22 23:10 UTC (permalink / raw)
  To: gcc-bugs

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

JuzheZhong <juzhe.zhong at rivai dot ai> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |juzhe.zhong at rivai dot ai

--- Comment #2 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
Could you give me the code to reproduce this issue?

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

* [Bug target/111545] [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error
  2023-09-22 22:31 [Bug target/111545] New: [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error ewlu at rivosinc dot com
  2023-09-22 22:32 ` [Bug target/111545] " ewlu at rivosinc dot com
  2023-09-22 23:10 ` juzhe.zhong at rivai dot ai
@ 2023-09-22 23:31 ` ewlu at rivosinc dot com
  2023-09-23  6:31 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ewlu at rivosinc dot com @ 2023-09-22 23:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Edwin Lu <ewlu at rivosinc dot com> ---
(In reply to JuzheZhong from comment #2)
> Could you give me the code to reproduce this issue?

Testcase file:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/testsuite/gfortran.dg/host_assoc_function_7.f90;h=df240a9f985d39162c50c6e5332744d7ff5bd59d;hb=66c13521f56

Cross compiled with flags: -march=rv64gcv -mabi=lp64d -mcmodel=medlow  
-fdiagnostics-plain-output  -fdiagnostics-plain-output    -O3
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  
-pedantic-errors   -lm

Raw command used:
./fortran_error/build-gcc-linux-stage2/gcc/testsuite/gfortran/../../gfortran
-B./fortran_error/build-gcc-linux-stage2/gcc/testsuite/gfortran/../../
-B./fortran_error/build-gcc-linux-stage2/riscv64-unknown-linux-gnu/./libgfortran/
 ./gcc/gcc/testsuite/gfortran.dg/host_assoc_function_7.f90  -march=rv64gcv
-mabi=lp64d -mcmodel=medlow   -fdiagnostics-plain-output 
-fdiagnostics-plain-output    -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions   -pedantic-errors     
-B./fortran_error/build-gcc-linux-stage2/riscv64-unknown-linux-gnu/./libgfortran/.libs
-L./fortran_error/build-gcc-linux-stage2/riscv64-unknown-linux-gnu/./libgfortran/.libs
-L./fortran_error/build-gcc-linux-stage2/riscv64-unknown-linux-gnu/./libgfortran/.libs
-L./fortran_error/build-gcc-linux-stage2/riscv64-unknown-linux-gnu/./libatomic/.libs
 -lm  -o ./host_assoc_function_7.exe

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

* [Bug target/111545] [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error
  2023-09-22 22:31 [Bug target/111545] New: [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error ewlu at rivosinc dot com
                   ` (2 preceding siblings ...)
  2023-09-22 23:31 ` ewlu at rivosinc dot com
@ 2023-09-23  6:31 ` rguenth at gcc dot gnu.org
  2023-09-25 22:37 ` juzhe.zhong at rivai dot ai
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-09-23  6:31 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0

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

* [Bug target/111545] [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error
  2023-09-22 22:31 [Bug target/111545] New: [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error ewlu at rivosinc dot com
                   ` (3 preceding siblings ...)
  2023-09-23  6:31 ` rguenth at gcc dot gnu.org
@ 2023-09-25 22:37 ` juzhe.zhong at rivai dot ai
  2023-10-20  6:38 ` lehua.ding at rivai dot ai
  2023-10-20 21:48 ` ewlu at rivosinc dot com
  6 siblings, 0 replies; 8+ messages in thread
From: juzhe.zhong at rivai dot ai @ 2023-09-25 22:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from JuzheZhong <juzhe.zhong at rivai dot ai> ---
Confirm this is the latent bug in VSETVL PASS which is already existed for a
long time.

Lehua is working on refactoring Phase 1 and Phase 2 of VSETVL PASS which will
fix all potential issues of VSETVL PASS.

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

* [Bug target/111545] [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error
  2023-09-22 22:31 [Bug target/111545] New: [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error ewlu at rivosinc dot com
                   ` (4 preceding siblings ...)
  2023-09-25 22:37 ` juzhe.zhong at rivai dot ai
@ 2023-10-20  6:38 ` lehua.ding at rivai dot ai
  2023-10-20 21:48 ` ewlu at rivosinc dot com
  6 siblings, 0 replies; 8+ messages in thread
From: lehua.ding at rivai dot ai @ 2023-10-20  6:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Lehua Ding <lehua.ding at rivai dot ai> ---
Hi Edwin,

I fixed by the commit id (29331e72d0ce9fe8aabdeb8c320b99943b9e067a) on trunk,
can you help confirm this fixed?

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

* [Bug target/111545] [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error
  2023-09-22 22:31 [Bug target/111545] New: [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error ewlu at rivosinc dot com
                   ` (5 preceding siblings ...)
  2023-10-20  6:38 ` lehua.ding at rivai dot ai
@ 2023-10-20 21:48 ` ewlu at rivosinc dot com
  6 siblings, 0 replies; 8+ messages in thread
From: ewlu at rivosinc dot com @ 2023-10-20 21:48 UTC (permalink / raw)
  To: gcc-bugs

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

Edwin Lu <ewlu at rivosinc dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Edwin Lu <ewlu at rivosinc dot com> ---
Confirmed resolved when running it locally and on our post commit ci pipeline
https://github.com/patrick-rivos/gcc-postcommit-ci/issues/55. 
Thanks!

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

end of thread, other threads:[~2023-10-20 21:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-22 22:31 [Bug target/111545] New: [14 Regression] RISC-V gfortran.dg/host_assoc_function_7.f09 Illegal instruction error ewlu at rivosinc dot com
2023-09-22 22:32 ` [Bug target/111545] " ewlu at rivosinc dot com
2023-09-22 23:10 ` juzhe.zhong at rivai dot ai
2023-09-22 23:31 ` ewlu at rivosinc dot com
2023-09-23  6:31 ` rguenth at gcc dot gnu.org
2023-09-25 22:37 ` juzhe.zhong at rivai dot ai
2023-10-20  6:38 ` lehua.ding at rivai dot ai
2023-10-20 21:48 ` ewlu 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).