This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/53537] New: Abstract interface with import interferes with only-clause
- From: "arjen.markus at deltares dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 31 May 2012 11:00:55 +0000
- Subject: [Bug fortran/53537] New: Abstract interface with import interferes with only-clause
- Auto-submitted: auto-generated
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