public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/107423] New: ICE in parse_spec, at fortran/parse.cc:4017
@ 2022-10-26 18:35 gscfq@t-online.de
  2022-10-27  0:10 ` [Bug fortran/107423] " kargl at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: gscfq@t-online.de @ 2022-10-26 18:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107423
           Summary: ICE in parse_spec, at fortran/parse.cc:4017
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to r8 with option -std=f95
and file gfortran.dg/pdt_12.f03 or this reduction :


$ cat z1.f90
program p
   type t(k)
      integer, kind :: k
      integer :: a
   end type
contains
   function f()
      type(t(4)), allocatable :: x
      allocate (t(4) :: x)
   end
end


$ gfortran-13-20221023 -c z1.f90
$
$ gfortran-13-20221023 -c z1.f90 -std=f95
z1.f90:3:23:

    3 |       integer, kind :: k
      |                       1
Error: Fortran 2003: KIND attribute at (1) in a TYPE definition
z1.f90:8:15:

    8 |       type(t(4)), allocatable :: x
      |               1
Error: Invalid character in name at (1)
z1.f90:9:18:

    9 |       allocate (t(4) :: x)
      |                  1
Error: Derived type 't' cannot be used as a variable at (1)
z1.f90:10:6:

   10 |    end
      |      1
Error: Fortran 2008: END statement instead of END FUNCTION statement at (1)
z1.f90:11:3:

   11 | end
      |   1
Error: Fortran 2008: END statement instead of END FUNCTION statement at (1)
f951: internal compiler error: Segmentation fault
0xf43b3f crash_signal
        ../../gcc/toplev.cc:314
0x85c4de parse_spec
        ../../gcc/fortran/parse.cc:4017
0x85ea5c parse_progunit
        ../../gcc/fortran/parse.cc:6237
0x85ee41 parse_contained
        ../../gcc/fortran/parse.cc:6138
0x85ece6 parse_progunit
        ../../gcc/fortran/parse.cc:6309
0x860121 gfc_parse_file()
        ../../gcc/fortran/parse.cc:6782
0x8aec0f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:229

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

end of thread, other threads:[~2022-12-13 21:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26 18:35 [Bug fortran/107423] New: ICE in parse_spec, at fortran/parse.cc:4017 gscfq@t-online.de
2022-10-27  0:10 ` [Bug fortran/107423] " kargl at gcc dot gnu.org
2022-12-13 18:09 ` cvs-commit at gcc dot gnu.org
2022-12-13 21:16 ` anlauf 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).