public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jeremy.bennett at embecosm dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/110996] New: RISC-V vector Fortran: SEGV ICE during parsing Date: Fri, 11 Aug 2023 15:59:40 +0000 [thread overview] Message-ID: <bug-110996-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110996 Bug ID: 110996 Summary: RISC-V vector Fortran: SEGV ICE during parsing Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: jeremy.bennett at embecosm dot com Target Milestone: --- Created attachment 55726 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55726&action=edit Fortran 90 source code for the test case This appears to be a failure in the Fortran parser, which only occurs if the RISC-V vector ISA extension is specified. This is the reproducer (testcase.f90): CONTAINS SUBROUTINE a END SUBROUTINE b END SUBROUTINE c(d) e SUBROUTINE f END END (which has a syntax error with the stray "e" at the end of the declaration of "SUBROUTINE c"). This is compiled with: riscv64-unknown-linux-gnu-gfortran -march=rv64gcv -mabi=lp64d -c \ -Ofast testcase.f90 NOTE. The error only occurs if the "v" extensions is specified in the "-march" string. The output is: testcase.f90:6:20: 6 | SUBROUTINE c(d) e | 1 Error: Syntax error in SUBROUTINE statement at (1) f951: internal compiler error: Segmentation fault 0x112a263 crash_signal /home/jeremy/gittrees/mustang/gcc/gcc/toplev.cc:314 0x7fdd1203c4af ??? ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 0xaaea0a resolve_symbol /home/jeremy/gittrees/mustang/gcc/gcc/fortran/resolve.cc:16643 0xadadc2 do_traverse_symtree /home/jeremy/gittrees/mustang/gcc/gcc/fortran/symbol.cc:4190 0xab95ed resolve_types /home/jeremy/gittrees/mustang/gcc/gcc/fortran/resolve.cc:17963 0xab9697 resolve_types /home/jeremy/gittrees/mustang/gcc/gcc/fortran/resolve.cc:17977 0xac08ec gfc_resolve(gfc_namespace*) /home/jeremy/gittrees/mustang/gcc/gcc/fortran/resolve.cc:18083 0xa9f250 resolve_all_program_units /home/jeremy/gittrees/mustang/gcc/gcc/fortran/parse.cc:6909 0xa9f250 gfc_parse_file() /home/jeremy/gittrees/mustang/gcc/gcc/fortran/parse.cc:7165 0xaf3533 gfc_be_parse_file /home/jeremy/gittrees/mustang/gcc/gcc/fortran/f95-lang.cc:229 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. System information ------------------ Using built-in specs. COLLECT_GCC=riscv64-unknown-linux-gnu-gfortran COLLECT_LTO_WRAPPER=/home/jeremy/gittrees/mustang/install/libexec/gcc/riscv64-unknown-linux-gnu/14.0.0/lto-wrapper Target: riscv64-unknown-linux-gnu Configured with: /home/jeremy/gittrees/mustang/gcc/configure --target=riscv64-unknown-linux-gnu --prefix=/home/jeremy/gittrees/mustang/install --with-sysroot=/home/jeremy/gittrees/mustang/install/sysroot --with-pkgversion=g68783211f66 --with-system-zlib --enable-shared --enable-tls --enable-languages=c,c++,fortran --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libsanitizer --disable-nls --disable-bootstrap --src=/home/jeremy/gittrees/mustang/gcc --enable-multilib --with-abi=lp64d --with-arch=rv64gc --with-tune= --with-isa-spec=20191213 'CFLAGS_FOR_TARGET=-O2 -mcmodel=medany' 'CXXFLAGS_FOR_TARGET=-O2 -mcmodel=medany' Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.0 20230811 (experimental) (g68783211f66)
next reply other threads:[~2023-08-11 15:59 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-08-11 15:59 jeremy.bennett at embecosm dot com [this message] 2023-08-12 2:35 ` [Bug fortran/110996] " juzhe.zhong at rivai dot ai 2023-08-13 19:35 ` anlauf at gcc dot gnu.org 2023-08-14 14:56 ` jeremy.bennett at embecosm dot com 2023-08-15 1:54 ` juzhe.zhong at rivai dot ai 2023-08-17 19:49 ` mikael at gcc dot gnu.org 2023-08-22 8:00 ` mikael at gcc dot gnu.org 2023-08-22 8:14 ` juzhe.zhong at rivai dot ai 2023-08-22 19:03 ` mikael at gcc dot gnu.org 2023-08-26 20:04 ` mikael at gcc dot gnu.org 2023-09-12 8:24 ` cvs-commit at gcc dot gnu.org 2023-09-12 8:33 ` mikael at gcc dot gnu.org 2023-09-15 17:27 ` mikael 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-110996-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).