public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35613] New: testsuite ISO_C_BIND code error
@ 2008-03-17 4:07 danp57 at optonline dot net
2008-03-17 16:01 ` [Bug fortran/35613] " toon at moene dot indiv dot nluug dot nl
0 siblings, 1 reply; 2+ messages in thread
From: danp57 at optonline dot net @ 2008-03-17 4:07 UTC (permalink / raw)
To: gcc-bugs
bind_c_usage_8.f03 in gcc/testsuite/gfortran.dg contains:
! PR fortran/32797
!
MODULE ISO_C_UTILITIES
USE ISO_C_BINDING
implicit none
CHARACTER(C_CHAR), DIMENSION(1), SAVE, TARGET, PRIVATE :: dummy_string="?"
CONTAINS
FUNCTION C_F_STRING(CPTR) RESULT(FPTR)
use, intrinsic :: iso_c_binding
TYPE(C_PTR), INTENT(IN) :: CPTR ! The C address
CHARACTER(KIND=C_CHAR), DIMENSION(:), POINTER :: FPTR
INTERFACE
FUNCTION strlen(string) RESULT(len) BIND(C,NAME="strlen") ! {
dg-warning "Implicitly declared" }
USE ISO_C_BINDING
TYPE(C_PTR), VALUE :: string ! A C pointer
END FUNCTION
END INTERFACE
CALL C_F_POINTER(FPTR=FPTR, CPTR=CPTR, SHAPE=[strlen(CPTR)])
END FUNCTION
END MODULE ISO_C_UTILITIES
! { dg-final { cleanup-modules "iso_c_utilities" } }
The line:
TYPE(C_PTR), INTENT(IN) :: CPTR ! The C address
should be:
TYPE(C_PTR), VALUE, TARGET:: CPTR ! the C address
--
Summary: testsuite ISO_C_BIND code error
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: danp57 at optonline dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35613
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug fortran/35613] testsuite ISO_C_BIND code error
2008-03-17 4:07 [Bug fortran/35613] New: testsuite ISO_C_BIND code error danp57 at optonline dot net
@ 2008-03-17 16:01 ` toon at moene dot indiv dot nluug dot nl
0 siblings, 0 replies; 2+ messages in thread
From: toon at moene dot indiv dot nluug dot nl @ 2008-03-17 16:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from toon at moene dot indiv dot nluug dot nl 2008-03-17 16:00 -------
*** This bug has been marked as a duplicate of 35612 ***
--
toon at moene dot indiv dot nluug dot nl changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35613
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-17 16:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-17 4:07 [Bug fortran/35613] New: testsuite ISO_C_BIND code error danp57 at optonline dot net
2008-03-17 16:01 ` [Bug fortran/35613] " toon at moene dot indiv dot nluug dot nl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).