From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 122893857C52; Sun, 14 Mar 2021 19:45:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 122893857C52 From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/99585] New: ICE with SIZE intrinsic on nested derived type components Date: Sun, 14 Mar 2021 19:45:23 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf 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 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: Sun, 14 Mar 2021 19:45:24 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99585 Bug ID: 99585 Summary: ICE with SIZE intrinsic on nested derived type components Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: anlauf at gcc dot gnu.org Target Milestone: --- As reported by Tobias Burnus in https://gcc.gnu.org/pipermail/fortran/2021-March/055815.html the following code ICEs with all gcc since at least 7: module m type t class(*), pointer :: bar(:) end type type t2 class(t), allocatable :: my(:) end type t2 contains function f (x, y) result(z) class(t) :: x(:) class(t) :: y(size(x(1)%bar)) type(t) :: z(size(x(1)%bar)) end function g (x) result(z) class(t) :: x(:) type(t) :: z(size(x(1)%bar)) end subroutine s () class(t2), allocatable :: a(:), b(:), c(:), d(:) class(t2), pointer :: p(:) c(1)%my =3D f (a(1)%my, b(1)%my) d(1)%my =3D g (p(1)%my) end end=