From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7944 invoked by alias); 31 May 2012 11:01:10 -0000 Received: (qmail 7933 invoked by uid 22791); 31 May 2012 11:01:09 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 May 2012 11:00:56 +0000 From: "arjen.markus at deltares dot nl" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/53537] New: Abstract interface with import interferes with only-clause Date: Thu, 31 May 2012 11:03:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: arjen.markus at deltares dot nl X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2012-05/txt/msg02919.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53537 Bug #: 53537 Summary: Abstract interface with import interferes with only-clause Classification: Unclassified Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned@gcc.gnu.org ReportedBy: arjen.markus@deltares.nl The program below gives errors on the use of the parameter wp. If the interface is not present, the program gets compiled. It is probably possible to reduce it even further, but the error disappears when the "only: wp => dp" clause is commented out. ---- module select_precision implicit none integer, parameter :: sp = kind( 1.0 ) integer, parameter :: dp = kind( 1.0d0 ) integer, parameter :: wp = sp end module select_precision module ode_types use select_precision, only: wp => dp implicit none private public :: wp type, abstract, public :: ode_system_t real(wp), dimension(:), allocatable :: x, x1, x2, x3, x4 real(wp) :: time, deltt integer :: size = 0 end type ode_system_t interface function ode_derivative( this, x, time ) result(deriv) import :: ode_system_t, wp class(ode_system_t) :: this real(wp), dimension(:) :: x real(wp) :: time real(wp), dimension(size(x)) :: deriv end function ode_derivative end interface end module ode_types