This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/84073] In -fc-prototypes fixed (nonzero) length strings are mapped to plain char in prototype.
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 28 Jan 2018 16:08:33 +0000
- Subject: [Bug fortran/84073] In -fc-prototypes fixed (nonzero) length strings are mapped to plain char in prototype.
- Auto-submitted: auto-generated
- References: <bug-84073-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84073
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |accepts-invalid
Status|WAITING |ASSIGNED
Blocks| |32630
--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
I'm going to fix the accepts-invalid part of this bug - this has gotten
more important with the automatic generation of interfaces.
How to work with Fortran arrays of character(len=1) as strings...
I thought there was an article by Steve Lionel about that, but I
cannot seem to find it.
TRANSFER looks like a good possibility, at least:
program main
character(len=10) :: a
character :: b(10)
b = 'x'
a = transfer(b,a)
print *,b
end program main
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32630
[Bug 32630] [meta-bug] ISO C binding