This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32804] New: ISO C Binding: C_LOC argument checking needs improvement
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jul 2007 07:47:45 -0000
- Subject: [Bug fortran/32804] New: ISO C Binding: C_LOC argument checking needs improvement
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
subroutine aaa(in)
use iso_c_binding
implicit none
CHARACTER(KIND=C_CHAR), DIMENSION(*), TARGET :: in
type(c_ptr) :: cptr
cptr = c_loc(in)
end subroutine
Wrongly rejected with:
Error: CHARACTER argument 'in' to 'c_loc' at (1) must have a length of 1
subroutine aaa(in)
use iso_c_binding
implicit none
integer(KIND=C_int), DIMENSION(:), TARGET :: in
type(c_ptr) :: cptr
cptr = c_loc(in)
end subroutine
Wrongly accepts this; NAG f95 writes:
Error: aa.f90, line 6: The argument to C_LOC must not be an assumed-shape array
--
Summary: ISO C Binding: C_LOC argument checking needs improvement
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: rejects-valid, accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
OtherBugsDependingO 32630
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32804