From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3DEFD3858D33; Tue, 20 Feb 2024 21:42:22 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3DEFD3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708465342; bh=SFYGJCRiNt5wKZFGiZITWXhTbyi98jEKv4v0PpU7pU0=; h=From:To:Subject:Date:From; b=t/YFoIg6P1uqLT8yj2aqYmEGC0vuzczI5UjU2KnMf5fLiv1o1G17LIm72Ubs38FVL Kd3W2GdFqx9QJ/16aMN3sYxltEQFwOPH7oRvOtlpU4H/zEmPyrEY+uLq4LeX9N2Yy9 LKQJgXialH/VCsAC+B5CbQDFFH2w31PMXmygL+9E= From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/114024] New: ICE allocate statement with source=cmp%re and z an array Date: Tue, 20 Feb 2024 21:42:21 +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: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kargl at gcc dot gnu.org 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=3D114024 Bug ID: 114024 Summary: ICE allocate statement with source=3Dcmp%re and z an array Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: kargl at gcc dot gnu.org Target Milestone: --- Found with the Fujitsu testsuite. The complex part%ref is a rank-1 array with dimension=3D3. xx should be allocated and assigned [3.45,3.45, 3.45] ! ! https://github.com/fujitsu/compiler-test-suite ! Modified from Fortran/0093/0093_0130.f90 ! implicit none complex:: cmp(3) real, allocatable::xx(:) cmp =3D (3.45,6.78) allocate (xx, source =3D cmp%re) end gfcx -c 0093/0093_0130.f90 0093/0093_0130.f90:10:36: 10 | allocate (xx, source =3D cmp(1:3)%re) | 1 internal compiler error: in retrieve_last_ref, at fortran/trans-array.cc:61= 97 0x6e889a retrieve_last_ref(gfc_ref**, gfc_ref**) ../../gccx/gcc/fortran/trans-array.cc:6197 0xa34c20 gfc_array_allocate(gfc_se*, gfc_expr*, tree_node*, tree_node*, tree_node*, tree_node*, tree_node*, tree_node**, gfc_expr*, tree_node*, boo= l, gfc_omp_namelist*) ../../gccx/gcc/fortran/trans-array.cc:6290 0xacce0b gfc_trans_allocate(gfc_code*, gfc_omp_namelist*) ../../gccx/gcc/fortran/trans-stmt.cc:6850 0xa25b49 trans_code ../../gccx/gcc/fortran/trans.cc:2535 0xa5ca15 gfc_generate_function_code(gfc_namespace*) ../../gccx/gcc/fortran/trans-decl.cc:7875 0x9cc496 translate_all_program_units ../../gccx/gcc/fortran/parse.cc:7073 0x9cc496 gfc_parse_file()=