From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 581 invoked by alias); 2 Jan 2015 21:26:03 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 554 invoked by uid 48); 2 Jan 2015 21:26:00 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/63552] [OOP] Type-bound procedures rejected as actual argument to dummy procedure Date: Fri, 02 Jan 2015 21:26:00 -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: 5.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: NEW 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg00064.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63552 --- Comment #4 from janus at gcc dot gnu.org --- (In reply to janus from comment #3) > For the commented-out line I get: > > call co_reduce(a,x%ppc) > 1 2 > Fehler: A argument at (1) has type INTEGER(4) but the function passed as > OPERATOR at (2) returns REAL(4) > > (which I guess is diagnosed correctly?) Thus the test case is invalid. Here is a corrected version: module m type t procedure(f), pointer, nopass :: ppc contains procedure, nopass :: tbp => f end type contains pure integer function f(a,b) integer, intent(in) :: a,b f = 0 end function end module use m integer :: a type(t) :: x ! call co_reduce(a,f) ! call co_reduce(a,x%ppc) call co_reduce(a,x%tbp) end