https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78534
Janne Blomqvist <jb at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |jb at gcc dot gnu.org --- Comment #3 from Janne Blomqvist <jb at gcc dot gnu.org> --- (In reply to Jerry DeLisle from comment #1) > (In reply to Janne Blomqvist from comment #0) > > Currently GFortran uses a plain C int for character lengths. This prevents > > longer characters on 64-bit targets. We should change to use size_t instead, > > similar to the C string functions (str*(), mem*()), malloc(), etc. Also > > Intel Fortran does this nowadays. > > > > Now that the libgfortran ABI version has been bumped, it is the right time > > to do this. > > > > See also https://gcc.gnu.org/wiki/LibgfortranAbiCleanup > > Agree, Are you going to do this? I'm working on a patch. I have managed to make it work except for the char_result_8.f90 testcase, which fails with an internal compiler error in the middle end when optimization is enabled. So it seems I'm passing the middle-end some nonsensical data. Also the patch so far changes the charlen type to ptrdiff_t, there are some places in the frontend where we use a negative charlen as a flag value. I though I'd get the size change working first before tackling the signed->unsigned change.