From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1B617385800B; Sat, 30 Jan 2021 00:13:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B617385800B From: "damian at sourceryinstitute dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/98897] New: Erroneous procedure attribute for associate name Date: Sat, 30 Jan 2021 00:13:57 +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: damian at sourceryinstitute dot 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: Sat, 30 Jan 2021 00:13:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98897 Bug ID: 98897 Summary: Erroneous procedure attribute for associate name Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: damian at sourceryinstitute dot org Target Milestone: --- The behavior demonstrated below also occurs if the procedure definition is moved to a submodule. Workarounds include (1) declaring "output_data" as a variable instead of an associate name or (2) making "output" a function referencing it as such instead of calling it as a subroutine. % cat bug.f90=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20 module output_data_m implicit none type output_data_t contains procedure output end type interface module subroutine output(self) implicit none class(output_data_t) self end subroutine end interface contains module procedure output end procedure end module use output_data_m implicit none associate(output_data =3D> output_data_t()) call output_data%output end associate end % gfortran bug.f90 bug.f90:24:20: 24 | call output_data%output | 1 Error: VARIABLE attribute of =E2=80=98output_data=E2=80=99 conflicts with P= ROCEDURE attribute at (1) % gfortran --version GNU Fortran (GCC) 11.0.0 20201231 (experimental)=