$> cat cloc.f90
USE ISO_C_BINDING, ONLY: C_PTR, C_LOC
CONTAINS
PURE SUBROUTINE F(x)
INTEGER, INTENT(in), TARGET :: x
TYPE(C_PTR) :: px
px = C_LOC(x)
END SUBROUTINE
END
$> gfortran-svn -Wimplicit-interface cloc.f90
cloc.f90:6.9:
px = C_LOC(x)
1
Warning: Procedure 'c_loc' called with an implicit interface at (1)
cloc.f90:6.9:
px = C_LOC(x)
1
Error: Function reference to 'c_loc' at (1) is to a non-PURE procedure within a
PURE procedure
$> gfortran-svn --version
GNU Fortran (GCC) 4.4.0 20081120 (experimental)
To my knowledge, all intrinsics have an explicit interface and are PURE by
default?!
--
Summary: C_LOC intrinsic non-pure and without explicit interface
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dfranke at gcc dot gnu dot org
OtherBugsDependingO 20585,32630
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38220