[Bug fortran/32599] New: [ISO C Binding] Accepts character with len /= 1
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon Jul 2 22:44:00 GMT 2007
The following two routines are invalid. The length has to be one (I think it
needs to be also an initialization expression).
While allowing it for -std=gnu is ok, there should be an error for -std=f2003.
NAG f95 prints:
Error: f.f90, line 5: Argument PATH of BIND(C) procedure DESTROY has assumed
CHARACTER length
Error: f.f90, line 11: Argument PATH of BIND(C) procedure CREATE has
CHARACTER(LEN=5)
subroutine destroy(path) BIND(C)
use iso_c_binding
implicit none
character(len=*,kind=c_char), intent(IN) :: path
end subroutine destroy
subroutine create(path) BIND(C)
use iso_c_binding
implicit none
character(len=5,kind=c_char), intent(IN) :: path
end subroutine create
end
--
Summary: [ISO C Binding] Accepts character with len /= 1
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: accepts-invalid
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32599
More information about the Gcc-bugs
mailing list