public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35612] testsuite ISO_C_BIND code error
[not found] <bug-35612-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-27 23:28 ` dfranke at gcc dot gnu.org
0 siblings, 0 replies; 7+ messages in thread
From: dfranke at gcc dot gnu.org @ 2010-12-27 23:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35612
Daniel Franke <dfranke at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |WORKSFORME
--- Comment #7 from Daniel Franke <dfranke at gcc dot gnu.org> 2010-12-27 23:28:16 UTC ---
(In reply to comment #6)
> Setting status to WAITING. To be closed as WORKSFORME(?) in 3 months form now
> if no further information comes forward.
Closing.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35612] testsuite ISO_C_BIND code error
2008-03-17 3:49 [Bug fortran/35612] New: " danp57 at optonline dot net
` (4 preceding siblings ...)
2009-01-07 13:52 ` mikael at gcc dot gnu dot org
@ 2010-05-02 14:00 ` dfranke at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-02 14:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dfranke at gcc dot gnu dot org 2010-05-02 14:00 -------
The testcase is still in its original form, the last attempt to get this
changed was never commented on:
http://gcc.gnu.org/ml/gcc-patches/2009-01/msg00118.html
Setting status to WAITING. To be closed as WORKSFORME(?) in 3 months form now
if no further information comes forward.
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
Status|NEW |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35612
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35612] testsuite ISO_C_BIND code error
2008-03-17 3:49 [Bug fortran/35612] New: " danp57 at optonline dot net
` (3 preceding siblings ...)
2009-01-06 21:16 ` mikael at gcc dot gnu dot org
@ 2009-01-07 13:52 ` mikael at gcc dot gnu dot org
2010-05-02 14:00 ` dfranke at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu dot org @ 2009-01-07 13:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from mikael at gcc dot gnu dot org 2009-01-07 13:51 -------
(In reply to comment #4)
> For TARGET, I agree because the standard says about c_f_pointer:
> The value of CPTR shall not be the C address of a Fortran variable that does
> not have the TARGET attribute.
>
Hum, I don't agree with myself. Only the pointee shall have the TARGET
attribute.
Not the pointer. Thus, I think the testcase is OK as is.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35612
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35612] testsuite ISO_C_BIND code error
2008-03-17 3:49 [Bug fortran/35612] New: " danp57 at optonline dot net
` (2 preceding siblings ...)
2008-03-18 1:23 ` danp57 at optonline dot net
@ 2009-01-06 21:16 ` mikael at gcc dot gnu dot org
2009-01-07 13:52 ` mikael at gcc dot gnu dot org
2010-05-02 14:00 ` dfranke at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: mikael at gcc dot gnu dot org @ 2009-01-06 21:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mikael at gcc dot gnu dot org 2009-01-06 21:16 -------
(In reply to comment #2)
> > 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.
>
For TARGET, I agree because the standard says about c_f_pointer:
The value of CPTR shall not be the C address of a Fortran variable that does
not have the TARGET attribute.
However, for VALUE, I fail to understand what is wrong.
Without value, the code generated is:
c_f_string (struct array1_unknown & __result, integer(kind=4) .__result, void *
& cptr)
{
(...)
(*(integer(kind=4)[1] *) atmp.0.data)[0] = strlen (*cptr);
(...)
c_f_pointer_s0 (*cptr, (struct array1_unknown *) __result, &atmp.3, 1);
}
With value:
c_f_string (struct array1_unknown & __result, integer(kind=4) .__result, void *
cptr)
{
(...)
(*(integer(kind=4)[1] *) atmp.0.data)[0] = strlen (cptr);
(...)
c_f_pointer_s0 (cptr, (struct array1_unknown *) __result, &atmp.3, 1);
}
Both seem equally good, aren't they?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35612
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35612] testsuite ISO_C_BIND code error
2008-03-17 3:49 [Bug fortran/35612] New: " danp57 at optonline dot net
2008-03-17 16:01 ` [Bug fortran/35612] " toon at moene dot indiv dot nluug dot nl
2008-03-17 23:38 ` burnus at gcc dot gnu dot org
@ 2008-03-18 1:23 ` danp57 at optonline dot net
2009-01-06 21:16 ` mikael at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: danp57 at optonline dot net @ 2008-03-18 1:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from danp57 at optonline dot net 2008-03-18 01:22 -------
Subject: Re: testsuite ISO_C_BIND code error
FPTR finally should POINT at that string (same thing CSTR points at)
with the correct type info/structure/array-shape set up correctly.
My primary reason to send this in is that these test code provides
great source code examples to figure out how this stuff SHOULD
work... in this case, I found myself taking on the role of debugger
when I wasn't quite sure how it was supposed to work in the first
place. I just figured it would help out...
Dan
On Mar 17, 2008, at 7:37 PM, burnus at gcc dot gnu dot org wrote:
>
>
> ------- 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
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35612
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35612] testsuite ISO_C_BIND code error
2008-03-17 3:49 [Bug fortran/35612] New: " danp57 at optonline dot net
2008-03-17 16:01 ` [Bug fortran/35612] " toon at moene dot indiv dot nluug dot nl
@ 2008-03-17 23:38 ` burnus at gcc dot gnu dot org
2008-03-18 1:23 ` danp57 at optonline dot net
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-03-17 23:38 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug fortran/35612] testsuite ISO_C_BIND code error
2008-03-17 3:49 [Bug fortran/35612] New: " danp57 at optonline dot net
@ 2008-03-17 16:01 ` toon at moene dot indiv dot nluug dot nl
2008-03-17 23:38 ` burnus at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ 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 -------
*** Bug 35613 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35612
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-12-27 23:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-35612-4@http.gcc.gnu.org/bugzilla/>
2010-12-27 23:28 ` [Bug fortran/35612] testsuite ISO_C_BIND code error dfranke at gcc dot gnu.org
2008-03-17 3:49 [Bug fortran/35612] New: " danp57 at optonline dot net
2008-03-17 16:01 ` [Bug fortran/35612] " toon at moene dot indiv dot nluug dot nl
2008-03-17 23:38 ` burnus at gcc dot gnu dot org
2008-03-18 1:23 ` danp57 at optonline dot net
2009-01-06 21:16 ` mikael at gcc dot gnu dot org
2009-01-07 13:52 ` mikael at gcc dot gnu dot org
2010-05-02 14:00 ` dfranke at gcc dot gnu dot org
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).