[Bug fortran/117643] F_C_STRING from F23 is missing

2025-01-01 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 Jerry DeLisle changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-30 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #30 from GCC Commits --- The master branch has been updated by Jerry DeLisle : https://gcc.gnu.org/g:efc0981077a70c4de4596f682c4aeade07ec2f17 commit r15-6471-gefc0981077a70c4de4596f682c4aeade07ec2f17 Author: Steven G. Kargl Date:

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-29 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #29 from anlauf at gcc dot gnu.org --- (In reply to Jerry DeLisle from comment #28) > --- snip --- > > > In iso-c-binding.def, one finds > > > > NAMED_CHARKNDCST (ISOCBINDING_CHAR, "c_char",gfc_default_character_kind) > > > > so ki

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-28 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #28 from Jerry DeLisle --- --- snip --- > In iso-c-binding.def, one finds > > NAMED_CHARKNDCST (ISOCBINDING_CHAR, "c_char",gfc_default_character_kind) > > so kind('a') == kind(c_char_'a') on all targets. This implies that is_c_in

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-28 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #27 from kargls at comcast dot net --- On 12/28/24 11:49, jvdelisle at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 > > --- Comment #26 from Jerry DeLisle --- > Why not set it in gfc_resolve_expr near

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-28 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #26 from Jerry DeLisle --- Why not set it in gfc_resolve_expr near the top before any other actions? also Are there any systems where c_char is not equal to 1? If not then BT_CHARACTER and KIND==1 is always C interoperable. ??

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-28 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #25 from Jerry DeLisle --- I clearly see where my logic was incorrect. I do wonder if there is a resolve string expr that would allow us to set the interop for all cases of kind=1 BT_CHARACTER.

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-28 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #24 from kargls at comcast dot net --- (In reply to anlauf from comment #22) > (In reply to anlauf from comment #21) > > > diff --git a/gcc/fortran/iresolve.cc b/gcc/fortran/iresolve.cc > > index 580f8c8407d..759eb99a645 100644 > > -

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-28 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #23 from kargls at comcast dot net --- (In reply to anlauf from comment #20) > (In reply to Jerry DeLisle from comment #19) > > (In reply to kargls from comment #17) > > > I suppose the error in check.cc(gfc_check_f_c_string) that sta

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-27 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #22 from anlauf at gcc dot gnu.org --- (In reply to anlauf from comment #21) > diff --git a/gcc/fortran/iresolve.cc b/gcc/fortran/iresolve.cc > index 580f8c8407d..759eb99a645 100644 > --- a/gcc/fortran/iresolve.cc > +++ b/gcc/fortran

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-27 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #21 from anlauf at gcc dot gnu.org --- (In reply to anlauf from comment #20) Replying to myself: > So if I come from the other side, which code to accept and which to diagnose, > I tried: > > if (string->ts.type != BT_CHARACTER >

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-27 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #20 from anlauf at gcc dot gnu.org --- (In reply to Jerry DeLisle from comment #19) > (In reply to kargls from comment #17) > > I suppose the error in check.cc(gfc_check_f_c_string) that starts > > with > > > > if (string->ts.typ

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-24 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #19 from Jerry DeLisle --- (In reply to kargls from comment #17) > On 12/24/24 10:03, jvdelisle at gcc dot gnu.org wrote: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 > > > > --- Comment #15 from Jerry DeLisle --- > > F

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-24 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 Jerry DeLisle changed: What|Removed |Added Attachment #59960|0 |1 is obsolete|

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-24 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #17 from kargls at comcast dot net --- On 12/24/24 10:03, jvdelisle at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 > > --- Comment #15 from Jerry DeLisle --- > From Harald's post. "There is another

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-24 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #16 from Jerry DeLisle --- Needed a minor tweak: + if (string->ts.type != BT_CHARACTER + || (string->ts.type == BT_CHARACTER // && on the inner paren instead of || + && (string->ts.kind != 1 && string->ts.is_c_interop

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-24 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #15 from Jerry DeLisle --- >From Harald's post. "There is another case I found while playing which is rejected: print *, f_c_string(c_char_"abc", asis)" I bet the parsing does not handle c_char_ with the two underscores. I h

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-24 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #14 from kargls at comcast dot net --- (In reply to Jerry DeLisle from comment #12) > The following additional patch from Harald posted on the gfortran list: > > https://gcc.gnu.org/pipermail/fortran/2024-December/061452.html > > di

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-23 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #13 from Jerry DeLisle --- Created attachment 59960 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59960&action=edit Cleaned up patch with Harald's addition. This patch fixes some white space and merges in Haralds patch for op

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-23 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #12 from Jerry DeLisle --- The following additional patch from Harald posted on the gfortran list: https://gcc.gnu.org/pipermail/fortran/2024-December/061452.html diff --git a/gcc/fortran/trans-intrinsic.cc b/gcc/fortran/trans-intr

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-17 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #11 from Jerry DeLisle --- I get a clean sweep on x86_64_linux_gnu. I will try some jerry-code to see if I can break it. If anyone else has comments, chime in. I think you submit to the list Steve.

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-17 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #10 from kargls at comcast dot net --- On 12/17/24 16:23, jvdelisle at gcc dot gnu.org wrote: > --- Comment #9 from Jerry DeLisle --- > Patch applies cleanly. Testing started. > Thanks, Jerry, for taking a look at the patch. On x8

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-17 Thread jvdelisle at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 Jerry DeLisle changed: What|Removed |Added Status|UNCONFIRMED |NEW Assignee|unassigned at gc

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-17 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #8 from kargls at comcast dot net --- (In reply to kargls from comment #7) > Created attachment 59903 [details] > Complete patch with testcase included > > The new diff is a complete implementation with an included testcase. Forgot

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-17 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 kargls at comcast dot net changed: What|Removed |Added Attachment #59827|0 |1 is obsolete|

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-16 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 Mikael Morin changed: What|Removed |Added CC||mikael at gcc dot gnu.org --- Comment #6

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-15 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 kargls at comcast dot net changed: What|Removed |Added Attachment #59830|0 |1 is obsolete|

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-10 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 kargls at comcast dot net changed: What|Removed |Added Attachment #59617|0 |1 is obsolete|

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-12-10 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #3 from kargls at comcast dot net --- Created attachment 59827 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59827&action=edit Testcase for f_c_string The attached testcase has a number of tests currently commented out. Those

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-11-17 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #2 from kargls at comcast dot net --- Created attachment 59617 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59617&action=edit initial partial implementation The attached patch is an initial implementation of f_c_string() up t

[Bug fortran/117643] F_C_STRING from F23 is missing

2024-11-17 Thread kargls at comcast dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117643 --- Comment #1 from kargls at comcast dot net --- Here's a testcase (obviously untested). ! ! { dg-do run } ! program foo use iso_c_binding, only : c_null_char, f_c_string logical, volatile :: asis character(len=6, kind=c_char) s1