From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7266 invoked by alias); 17 Dec 2009 23:02:58 -0000 Received: (qmail 3821 invoked by uid 48); 17 Dec 2009 23:02:43 -0000 Date: Thu, 17 Dec 2009 23:02:00 -0000 Message-ID: <20091217230243.3820.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/42418] PROCEDURE: Rejects interface which is both specific and generic procedure In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" 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 X-SW-Source: 2009-12/txt/msg01771.txt.bz2 ------- Comment #1 from burnus at gcc dot gnu dot org 2009-12-17 23:02 ------- The following program is also rejected, unless the marked line is removed/comment out. At a glance, it looks OK - and ifort, NAG f95 and g95 accept it. The error message is: print *, fun(enisoc, [0.0]) 1 Error: ELEMENTAL non-INTRINSIC procedure 'enisoc' is not allowed as an actual argument at (1) module cos_mod implicit none interface enisoc module procedure element, enisoc end interface enisoc contains pure function enisoc(x) real, intent(in) :: x(:) real enisoc(size(x)) enisoc = 2 end function enisoc elemental function element(x) real, intent(in) :: x real element element = cos(x) end function element end module cos_mod program main use cos_mod implicit none interface function fun(f,x) implicit none interface pure function f(x) real, intent(in) :: x(:) real f(size(x)) end function f end interface real x(:) real fun(size(x)) end function fun end interface print *, enisoc(0.0) ! <<< Works without this line print *, fun(enisoc, [0.0]) end program main !function fun(f,x) ! implicit none ! interface ! pure function f(x) ! real, intent(in) :: x(:) ! real f(size(x)) ! end function f ! end interface ! real x(:) ! real fun(size(f(x))) ! ! fun = f(x) !end function fun -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|PROCEDURE: Rejects |PROCEDURE: Rejects interface |interfface which is both |which is both specific and |specific and generic |generic procedure |procedure | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42418