From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AF9B33858D28; Tue, 20 Feb 2024 21:13:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AF9B33858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708463630; bh=Z7naGo0gLeBcE+y6KNGsEiF2NAl8Ac+eBsPG58tSU/E=; h=From:To:Subject:Date:From; b=nJ8NxXL6ptSVCSvuM8Tct8JzJm6UGd3K+KgAR4Mw37npY9Xtr+4sw53aRSMHz2vju ewDhCJ+CO3Nkqu7GaDVKsjwGNQLUv95HDKWnzGwDB/lfdJRf9sYEAZVIwJoN/5A5r9 EQUUv0WmylxeJfX1ZSFAVI0dTIg3bgGsbdr2jQQo= From: "kargl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/114022] New: ICE with a complex part%ref and nested structure constructor of complex array. Date: Tue, 20 Feb 2024 21:13:50 +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=3D114022 Bug ID: 114022 Summary: ICE with a complex part%ref and nested structure constructor of complex 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 in the first if-stmt leads to an ICE. Likely, the nested structure constructor is not setting the value of zz correctly. ! ! https://github.com/fujitsu/compiler-test-suite ! Reduced from Fortran/0093/0093_0025.f90 ! module m1 type ty complex :: cmp1(2) end type ty type tt type(ty) :: obj end type tt type(tt), parameter :: obj2 =3D tt(ty([(2,3),(3,5)])) end module m1 use m1, only : obj2 real :: rr(2) =3D obj2%obj%cmp1%re if (rr(1) .ne. 2) stop 1 if (rr(2) .ne. 3) stop 2 end % gfcx -c 0093/0093_0025.f90 0093/0093_0025.f90:15:22: 15 | use m1, only : obj2 | 1 internal compiler error: Segmentation fault 0x109b292 crash_signal ../../gccx/gcc/toplev.cc:317 0x248c5f37f handle_signal /usr/src/lib/libthr/thread/thr_sig.c:301 0x248c5e9b7 thr_sighandler /usr/src/lib/libthr/thread/thr_sig.c:244 0xa74904 gfc_conv_structure(gfc_se*, gfc_expr*, int) ../../gccx/gcc/fortran/trans-expr.cc:9634 0xa45a6d gfc_conv_array_initializer(tree_node*, gfc_expr*) ../../gccx/gcc/fortran/trans-array.cc:6546 0xa745ab gfc_conv_initializer(gfc_expr*, gfc_typespec*, tree_node*, bool, b= ool, bool)=