From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 155363858C55; Thu, 13 Oct 2022 16:30:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 155363858C55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665678651; bh=V6P6X0s9v97qzibAGT9wCNGpnljOt1Ckc45Wcn5MgrM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=POtXt+oDNgQQ6jqvaGu7nyjjohWJnQveqtFX5O8DhaG9xGCQJge8hAYUxXGjvhSXO 4yhn1Z9pVAyTPNYVd3LdkYHMSz7oGIIuSVGk5rHUBkAflJkTEAgGBWg6/dVcadPSFU UkeXdNAQbM/Cc8hbvffp3PD8mcIuht2GSBThgWhQ= From: "aarograh at umich dot edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/85541] ICE with parameterized derived type (PDT) and allocate Date: Thu, 13 Oct 2022 16:30:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aarograh at umich dot edu X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: 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=3D85541 aarograh at umich dot edu changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aarograh at umich dot edu --- Comment #4 from aarograh at umich dot edu --- I've also encountered issues with this in gcc 8.3. Here's my even simpler example that shows the error. The commented code hints at the more complex functionality that I'm actually working toward. MODULE testMod IMPLICIT NONE PUBLIC TYPE :: cache(n) INTEGER,LEN :: n REAL :: a(n) ENDTYPE cache TYPE :: parent TYPE(cache(1)),ALLOCATABLE :: cache ENDTYPE parent ENDMODULE testMod PROGRAM test USE testMod TYPE(cache(1)),ALLOCATABLE :: testcache TYPE(parent) :: testparent ALLOCATE(cache(1) :: testcache) WRITE(*,*) testcache%n WRITE(*,*) testcache%a !ALLOCATE(cache(1) :: testparent%cache) !WRITE(*,*) testparent%cache%n !WRITE(*,*) testparent%cache%a ENDPROGRAM test f951: internal compiler error: in gfc_get_derived_type, at fortran/trans-types.c:2545 0x5c6ca5 gfc_get_derived_type(gfc_symbol*, int) ../../gcc-8.3.0-source/gcc/fortran/trans-types.c:2545 0x748aa8 gfc_get_derived_type(gfc_symbol*, int) ../../gcc-8.3.0-source/gcc/fortran/trans-types.c:2691 0x749498 gfc_typenode_for_spec(gfc_typespec*, int) ../../gcc-8.3.0-source/gcc/fortran/trans-types.c:1203 0x74975c gfc_sym_type(gfc_symbol*) ../../gcc-8.3.0-source/gcc/fortran/trans-types.c:2272 0x74975c gfc_sym_type(gfc_symbol*) ../../gcc-8.3.0-source/gcc/fortran/trans-types.c:2230 0x6f443d gfc_get_symbol_decl(gfc_symbol*) ../../gcc-8.3.0-source/gcc/fortran/trans-decl.c:1739 0x6f6ff8 gfc_create_module_variable ../../gcc-8.3.0-source/gcc/fortran/trans-decl.c:5024 0x6f6ff8 gfc_create_module_variable ../../gcc-8.3.0-source/gcc/fortran/trans-decl.c:4941 0x6bd202 do_traverse_symtree ../../gcc-8.3.0-source/gcc/fortran/symbol.c:4179 0x6f98b3 gfc_generate_module_vars(gfc_namespace*) ../../gcc-8.3.0-source/gcc/fortran/trans-decl.c:5496 0x6d5459 gfc_generate_module_code(gfc_namespace*) ../../gcc-8.3.0-source/gcc/fortran/trans.c:2201 0x6886bb translate_all_program_units ../../gcc-8.3.0-source/gcc/fortran/parse.c:6112 0x6886bb gfc_parse_file() ../../gcc-8.3.0-source/gcc/fortran/parse.c:6328 0x6cefbf gfc_be_parse_file ../../gcc-8.3.0-source/gcc/fortran/f95-lang.c:204 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions.=