From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29721 invoked by alias); 21 Aug 2010 12:30:14 -0000 Received: (qmail 29439 invoked by uid 48); 21 Aug 2010 12:29:54 -0000 Date: Sat, 21 Aug 2010 12:30:00 -0000 Subject: [Bug fortran/45366] New: Problem with abstract interface to PURE function X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "mrestelli at gmail dot com" 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: 2010-08/txt/msg01736.txt.bz2 Hi all, gfortran refuses the attached code as pure function i_g(x,p) result(y) 1 Error: Dummy procedure 'p' of PURE procedure at (1) must also be PURE Notice however that i_f is an abstract interface to a PURE function. (As a comment, ifort accepts the code.) module m1 implicit none abstract interface pure function i_f(x) result(y) real, intent(in) :: x real :: y end function i_f end interface end module m1 module m2 use m1, only: i_f implicit none contains pure function i_g(x,p) result(y) real, intent(in) :: x procedure(i_f), pointer, intent(in) :: p real :: y y = p(x) end function i_g end module m2 -- Summary: Problem with abstract interface to PURE function Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mrestelli at gmail dot com GCC build triplet: GNU Fortran (GCC) 4.6.0 20100821 (experimental) GCC host triplet: AMD Turion(tm) 64 Mobile Technology ML-32 AuthenticAMD GNU/Linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45366