This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/35612] testsuite ISO_C_BIND code error
- 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: 17 Mar 2008 23:37:32 -0000
- Subject: [Bug fortran/35612] testsuite ISO_C_BIND code error
- References: <bug-35612-13225@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from burnus at gcc dot gnu dot org 2008-03-17 23:37 -------
> The line:
> TYPE(C_PTR), INTENT(IN) :: CPTR ! The C address
> should be:C_F_STRING(CPTR)
> TYPE(C_PTR), VALUE, TARGET:: CPTR ! the C address
You are right. The call to strlen is OK in either case, however, the call to
C_F_POINTER() does not make sense for a pointer to a C string ("**char") only
for the version with VALUE ("*char") as fptr should finally contain the string.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-03-17 23:37:32
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35612