From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 116FF3885538; Wed, 26 Oct 2022 20:44:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 116FF3885538 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666817091; bh=9SV5buTmPdSIK5hIAFFIjtkm4qUdL1nf6KMAC0ruvAo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=FSObul2e8L99s71tHN5XIOxfTdOs6vyBE7p4v0CtNS/O1JkTXfAP8+a9GLkJIVhWU chxueuE8Qxs0UtmU4iyEYwgn879CJRG9ijx+fxOZMo5IGnd8Sky1MjMFpekwvgSTR9 IU/d1DDKdVRU7Ppk1VOL0rnWgeao+tfYEAVI1Fqo= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/103474] ICE in simplify_cobound, at fortran/simplify.c:4415 Date: Wed, 26 Oct 2022 20:44:50 +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: anlauf at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 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=3D103474 --- Comment #5 from anlauf at gcc dot gnu.org --- I am now stuck with the following code, which I believe is valid. (It is accepted by Crayftn and rejected by Intel, but I thought it is covered by F2018:5.4.7(5)): program p type t integer :: a(1,2) end type class(t), allocatable :: x[:] print *, ucobound (x%a) end The problem I have is that gfc_conv_expr_descriptor invokes walk_coarray, but the result depends on the rank of the array a in type t. The comment before walk_coarray states: /* Convert the last ref of a scalar coarray from an AR_ELEMENT to an AR_FULL, suitable for the scalarizer. */ However, we should find a way to only extract the "co-descriptor". We might also need that when implement COSHAPE.=