From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 64E483857C4B; Wed, 26 Oct 2022 18:35:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 64E483857C4B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666809356; bh=2u0R/GdKTjPkz8jZANzmzCt04XPtNDbBL6Ir1EhifaU=; h=From:To:Subject:Date:From; b=CL9U/I3a6gurXIm6EjqJfsOjiHz+RipdOOHHfZSW7ftfQCA9lV2z6cxlQs9rUGo+j rQwf44FvlOIgpHGZDE6Gyw5nGLweIBB8uvp1ViRVKt95sLVq1dJzsuAIP/I5FpLLw8 YnPKyPhxFgFm24qIAHPY0GVrLUbhpH/NKy+pVirI= From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/107423] New: ICE in parse_spec, at fortran/parse.cc:4017 Date: Wed, 26 Oct 2022 18:35:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107423 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=3Df95 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=3Df95 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=