This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32599] New: [ISO C Binding] Accepts character with len /= 1
- 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: 2 Jul 2007 22:43:58 -0000
- Subject: [Bug fortran/32599] New: [ISO C Binding] Accepts character with len /= 1
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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