From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8B8743858D33; Thu, 9 Nov 2023 21:32:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8B8743858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699565554; bh=wJ1KyOThDqe5sPZV3rtclyQq8NetWvneV6vslbqrE+g=; h=From:To:Subject:Date:In-Reply-To:References:From; b=kGJoOWQB4tj34YzOyp4IrIRQzxcboP4ijgnuYScwGoBkCIUtdXYhwjbqTrVl/aIdR ZAGPKq7J9ls93PieKbMMQVm4Ia8Nfp4h2rMhrbhS7ihqYIb9xoIZ8Id6Jrlg4llqIs GlQlD89LN2/2GXK1wNf4o//yB5teEPgbolvJhkGw= From: "anlauf at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/104819] Reject NULL without MOLD as actual to an assumed-rank dummy Date: Thu, 09 Nov 2023 21:32:33 +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: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: anlauf at gcc dot gnu.org X-Bugzilla-Status: NEW 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: attachments.isobsolete attachments.created 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=3D104819 anlauf at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56519|0 |1 is obsolete| | --- Comment #4 from anlauf at gcc dot gnu.org --- Created attachment 56546 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D56546&action=3Dedit Second version of a patch This patch contains a revised checking of NULL() as actual argument which should be consistent with F2008+ for allocatables. It also fixes the cases where NULL(x) is passed to an assumed-rank dummy, but only for scalar x so far. I might need some assistance in how to produce a proper descriptor to pass for rank > 0. (I added a gfc_internal_error (TODO) for the allocatable cas= e.) Regtests essentially fine, but requires fixing these invalid testcases: ! gfortran.dg/assumed_rank_8.f90 ! gfortran.dg/assumed_rank_9.f90 ! gfortran.dg/assumed_rank_10.f90 ! gfortran.dg/pr101329.f90=