From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 14E733858D39; Wed, 15 Mar 2023 08:58:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14E733858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1678870723; bh=Ef1x7gYi5H4kgYY4CFeXKoQ/obplXbnfcPbbtXANCwk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=UsZ329LqiheOu/EookxII9Ev+eniPTnR05TaNYfUNnBtbvIW4UxMy9RB2agWBmxDg EAe6JwM4Juib0AsdHeihecc7mqDhZzqf3Q7H9fSDN6Uf6SCPi54s6c0Ye+YCInGtTF ZLb65fRzXsDMOZbzHggHZf70Hpitm553xpyYjLQE= From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/58331] [OOP] Bogus rank checking with explicit-/assumed-size arrays and CLASS Date: Wed, 15 Mar 2023 08:58:41 +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: 4.9.0 X-Bugzilla-Keywords: rejects-valid, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: anlauf 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=3D58331 --- Comment #9 from Tobias Burnus --- COARRAYS: (In reply to anlauf from comment #7) > I tried other testcases that use coarrays, but e.g. the following scalar > coarray case produces an ICE later on. I believe this is a pre-existing > separate issue. A coarray 'ca' can either be a local variable (the usual case), a remove reference (then with '[indx]' in the expr) - or, like here, the full thing. In gfc_conv_intrinsic_to_class, the gfc_conv_expr_reference 'destroys' the coarray part. I think we need something like 'gfc_conv_variable' =E2=80=94 = and I bet that we need to ensure all combinations work: (scalar,array w/o and w/ descriptor) =E2=86=92 (assumed rank, array w/o and= w/ descriptor) - where the 'to class' (and, obviously, the 'from' was well) are coarrays. Besides intrinsic types -> class(*), we should also check check type(t) -> ('class(t)' and 'class(*)')=