From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 17F513858C20; Mon, 29 Aug 2022 18:09:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 17F513858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661796542; bh=t959ZDNjK7v+SsbDBAXVn/5SuPiljV2qbZYRyhGjbK4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=oC9lvaHyHarODhpM9mVbx4ae3LjXGquhEoTCJnJ39qvBDrpFhIJmcZo4j0GXt62R0 Q8BYCxRWoZcQvM+yCaYWhp6p0+mZde2uL/SFxTlHmOejPZYE3s9FvlIkaSYxhKbcr9 7eNDxvPWPyVHrgpMfXb4sHJRfv2vFCgfdLtwqeBo= From: "federico.perini at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/106771] [OOP] ICE with PACK intrinsic, in gfc_conv_expr_descriptor, at fortran/trans-array.c:7328 Date: Mon, 29 Aug 2022 18:09:01 +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.2.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: federico.perini at gmail dot com X-Bugzilla-Status: WAITING 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: 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=3D106771 --- Comment #3 from federico --- Right: here is a version where the object is initialized:=20 https://godbolt.org/z/o566cPG8P I also see that for the versions that compile (e.g., 11.1.0), there's a wei= rd SEGFAULT error at this line:=20 elemental logical function isa(this,i) class(t), intent(in) :: this integer, intent(in) :: i integer :: n n =3D merge(size(this%iloc),0,allocated(this%iloc)) if (i>0 .and. i<=3Dn) then ! Segmentation fault here=20 isa =3D this%iloc(i)>0 else isa =3D .false. endif=20=20 end function isa So it at least compiles, but apparently the bug is hidden somewhere else?=