public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/100906] New: Bind(c): failure handling character with len/=1
@ 2021-06-04 17:41 jrfsousa at gcc dot gnu.org
2021-06-04 17:42 ` [Bug fortran/100906] " jrfsousa at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: jrfsousa at gcc dot gnu.org @ 2021-06-04 17:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100906
Bug ID: 100906
Summary: Bind(c): failure handling character with len/=1
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jrfsousa at gcc dot gnu.org
Target Milestone: ---
Created attachment 50929
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50929&action=edit
Fortran code showing problem
Hi All!
Failures (mostly mixing kind with len) on handling character with length
greater than 1.
Seen on:
GNU Fortran (GCC) 10.3.1 20210526 (ICE)
GNU Fortran (GCC) 11.1.1 20210526
GNU Fortran (GCC) 12.0.0 20210529 (experimental)
Thank you very much.
Best regards,
José Rui
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/100906] Bind(c): failure handling character with len/=1
2021-06-04 17:41 [Bug fortran/100906] New: Bind(c): failure handling character with len/=1 jrfsousa at gcc dot gnu.org
@ 2021-06-04 17:42 ` jrfsousa at gcc dot gnu.org
2021-06-13 18:51 ` jrfsousa at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jrfsousa at gcc dot gnu.org @ 2021-06-04 17:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100906
--- Comment #1 from José Rui Faustino de Sousa <jrfsousa at gcc dot gnu.org> ---
Created attachment 50930
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50930&action=edit
C code for bind(c)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/100906] Bind(c): failure handling character with len/=1
2021-06-04 17:41 [Bug fortran/100906] New: Bind(c): failure handling character with len/=1 jrfsousa at gcc dot gnu.org
2021-06-04 17:42 ` [Bug fortran/100906] " jrfsousa at gcc dot gnu.org
@ 2021-06-13 18:51 ` jrfsousa at gcc dot gnu.org
2021-06-13 18:51 ` jrfsousa at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jrfsousa at gcc dot gnu.org @ 2021-06-13 18:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100906
--- Comment #2 from José Rui Faustino de Sousa <jrfsousa at gcc dot gnu.org> ---
Patch posted:
https://gcc.gnu.org/pipermail/fortran/2021-June/056154.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/100906] Bind(c): failure handling character with len/=1
2021-06-04 17:41 [Bug fortran/100906] New: Bind(c): failure handling character with len/=1 jrfsousa at gcc dot gnu.org
2021-06-04 17:42 ` [Bug fortran/100906] " jrfsousa at gcc dot gnu.org
2021-06-13 18:51 ` jrfsousa at gcc dot gnu.org
@ 2021-06-13 18:51 ` jrfsousa at gcc dot gnu.org
2021-07-26 12:52 ` burnus at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jrfsousa at gcc dot gnu.org @ 2021-06-13 18:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100906
--- Comment #3 from José Rui Faustino de Sousa <jrfsousa at gcc dot gnu.org> ---
Created attachment 51001
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51001&action=edit
Patch and changelog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/100906] Bind(c): failure handling character with len/=1
2021-06-04 17:41 [Bug fortran/100906] New: Bind(c): failure handling character with len/=1 jrfsousa at gcc dot gnu.org
` (2 preceding siblings ...)
2021-06-13 18:51 ` jrfsousa at gcc dot gnu.org
@ 2021-07-26 12:52 ` burnus at gcc dot gnu.org
2021-07-27 10:24 ` burnus at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-07-26 12:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100906
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
I have committed:
r12-2431-gb3d4011ba10275fbd5d6ec5a16d5aaebbdfb5d3c
https://gcc.gnu.org/pipermail/gcc-patches/2021-July/575729.html
which should fix most diagnostic issues with character len /= 1 – except for:
* len=0 – in my understanding, that's valid when using a descriptor but not
when passing the argument as address to the byte stream
-> with current patch not rejected.
* const-length > 1 module variables with BIND(C). Those should now be valid
as well, but that was not touched by this patch.
Regarding len=0 and other things, see also thread starting at
https://mailman.j3-fortran.org/pipermail/j3/2021-July/013189.html
* * *
Other TODO with regards to things diagnostic in my patch:
* See 'sorry' in the patch and in the testsuite. Namely:
len=* and len=: require an array descriptor, but for
scalars and (len=*, only) for assumed/explicit-size
arrays no descriptor is used. (Hence, the code aborts
with an error)
-> Requires an update both for the call and for the
function type and for the function interface declaration.
* * *
Attached/submitted patch by José: There is a minor overlap to my committed
patch and some overlap to the issues listed above, but I have not sorted it
out, yet.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/100906] Bind(c): failure handling character with len/=1
2021-06-04 17:41 [Bug fortran/100906] New: Bind(c): failure handling character with len/=1 jrfsousa at gcc dot gnu.org
` (3 preceding siblings ...)
2021-07-26 12:52 ` burnus at gcc dot gnu.org
@ 2021-07-27 10:24 ` burnus at gcc dot gnu.org
2021-10-22 15:29 ` cvs-commit at gcc dot gnu.org
2021-10-22 15:32 ` sandra at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-07-27 10:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100906
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Cross ref:
See also PR 92482 "BIND(C) with array-descriptor mishandled for type character"
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/100906] Bind(c): failure handling character with len/=1
2021-06-04 17:41 [Bug fortran/100906] New: Bind(c): failure handling character with len/=1 jrfsousa at gcc dot gnu.org
` (4 preceding siblings ...)
2021-07-27 10:24 ` burnus at gcc dot gnu.org
@ 2021-10-22 15:29 ` cvs-commit at gcc dot gnu.org
2021-10-22 15:32 ` sandra at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-22 15:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100906
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sandra Loosemore <sandra@gcc.gnu.org>:
https://gcc.gnu.org/g:b7cb6d66bd52e884ff33c61e46a9ee9facc2ac60
commit r12-4628-gb7cb6d66bd52e884ff33c61e46a9ee9facc2ac60
Author: Sandra Loosemore <sandra@codesourcery.com>
Date: Thu Oct 21 19:17:50 2021 -0700
Add testcase for PR fortran/100906
2021-10-21 José Rui Faustino de Sousa <jrfsousa@gmail.com>
Sandra Loosemore <sandra@codesourcery.com>
gcc/testsuite/
PR fortran/100906
* gfortran.dg/PR100906.f90: New.
* gfortran.dg/PR100906.c: New.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/100906] Bind(c): failure handling character with len/=1
2021-06-04 17:41 [Bug fortran/100906] New: Bind(c): failure handling character with len/=1 jrfsousa at gcc dot gnu.org
` (5 preceding siblings ...)
2021-10-22 15:29 ` cvs-commit at gcc dot gnu.org
@ 2021-10-22 15:32 ` sandra at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: sandra at gcc dot gnu.org @ 2021-10-22 15:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100906
sandra at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |sandra at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #7 from sandra at gcc dot gnu.org ---
This was fixed as part of Tobias's big GFC <-> CFI descriptor re-work, and I've
separately committed the testcase for this issue. I think we can close this
issue now.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-10-22 15:32 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-04 17:41 [Bug fortran/100906] New: Bind(c): failure handling character with len/=1 jrfsousa at gcc dot gnu.org
2021-06-04 17:42 ` [Bug fortran/100906] " jrfsousa at gcc dot gnu.org
2021-06-13 18:51 ` jrfsousa at gcc dot gnu.org
2021-06-13 18:51 ` jrfsousa at gcc dot gnu.org
2021-07-26 12:52 ` burnus at gcc dot gnu.org
2021-07-27 10:24 ` burnus at gcc dot gnu.org
2021-10-22 15:29 ` cvs-commit at gcc dot gnu.org
2021-10-22 15:32 ` sandra at gcc dot gnu.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).