From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 10E133858CDA; Tue, 14 Nov 2023 21:17:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 10E133858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699996665; bh=gEjfgg1JZmMhIaXLxiGMvpw0YLzdlllCpA9ujLkSCWM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=PhBbaJUWWVSxWjDT/Lb4Pq3LpdRG4bjoikeI5h2f8Km1Xeh75dxh3VGjGzfX8qMuM q5ZIUaU3YjnRqt42QxxL5zVa+DT3uGcMkEI9D4DZeNQXkKlN7fnY44xzXWj1zhgl4Z 6rNHq44hg/2Jjnq020zE79ypyUsAchMcx1cV8zBA= 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: Tue, 14 Nov 2023 21:17:44 +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: 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 --- Comment #6 from anlauf at gcc dot gnu.org --- (In reply to anlauf from comment #5) > We need to detect and diagnose violations of the above. Example: program main implicit none type t integer :: i end type t type(t), allocatable, target :: xa type(t), pointer :: xp class(t), allocatable, target :: ya class(t), pointer :: yp call foo_p (xp) ! Invalid call foo_p (xa) ! Invalid in F2008, valid in F2018 call foo_p (yp) ! Valid, OK call foo_p (ya) ! Valid, OK contains subroutine foo_p (x) class(t), pointer, intent(in) :: x end subroutine end The lines marked invalid are detected for -std=3Df2003, but not for >=3D f2= 008.=