From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5C6AB3858D29; Wed, 22 Sep 2021 17:42:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5C6AB3858D29 From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/102458] ICE tree check: expected array_type, have pointer_type in gfc_conv_array_initializer, at fortran/trans-array.c:6136 Date: Wed, 22 Sep 2021 17:42:46 +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: 12.0 X-Bugzilla-Keywords: ice-on-invalid-code 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: keywords 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2021 17:42:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102458 G. Steinmetz changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code --- Comment #1 from G. Steinmetz --- There are several variants : $ cat z3.f90 subroutine s integer :: a(num_images()) =3D 1 print *, a end $ cat z4.f90 subroutine s integer :: a(this_image()) =3D 1 print *, a end $ cat z7.f90 subroutine s integer :: a(command_argument_count()) =3D 1 a =3D 2 end $ cat z8.f90 program p block integer :: a(command_argument_count()) =3D 1 print *, a end block end $ cat za.f90 function f() integer :: a(command_argument_count()) =3D 0 a =3D 1 end $ cat zb.f90 program p block integer :: n(command_argument_count()) =3D 0 n =3D 1 end block end $ gfortran-12-20210919 -c zb.f90 zb.f90:3:44: 3 | integer :: n(command_argument_count()) =3D 0 | 1 internal compiler error: in gfc_trans_auto_array_allocation, at fortran/trans-array.c:6426 0x797a5b gfc_trans_auto_array_allocation(tree_node*, gfc_symbol*, gfc_wrapped_block*) ../../gcc/fortran/trans-array.c:6426 0x7b1f17 gfc_trans_deferred_vars(gfc_symbol*, gfc_wrapped_block*) ../../gcc/fortran/trans-decl.c:4921 0x8054e1 gfc_trans_block_construct(gfc_code*) ../../gcc/fortran/trans-stmt.c:2311 0x78e4a7 trans_code ../../gcc/fortran/trans.c:2014 0x7b4c04 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6919 0x73af76 translate_all_program_units ../../gcc/fortran/parse.c:6572 0x73af76 gfc_parse_file() ../../gcc/fortran/parse.c:6841 0x78761f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:216=