[patch, fortran] Fix PR 85781, ICE on valid
Tobias Burnus
tobias@codesourcery.com
Mon Jan 20 12:50:00 GMT 2020
Hi Thomas,
On 1/19/20 7:21 PM, Thomas König wrote:
> the attached patch fixes an ICE which could occur for empty
> substrings (see test case).
I think one should rather fix the following issue. â While on x86-64 it
does not seem to cause problems, it might for other platforms.
Additionally, it is a missed optimization to use "A123" instead of "66"
in the call.
Namely, gfortran generates a different code when using kind=c_type
instead of kind=1 â although the kind value is the same! (Without
BIND(C) or without VALUE, the generated code is the same.) The dump is:
two (character(kind=1)[1:1] x) vs. three (character(kind=1) x)
Expected is the latter. See attached test case.
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bind_c_char.f90
Type: text/x-fortran
Size: 1758 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20200120/3c09b316/attachment.bin>
More information about the Gcc-patches
mailing list