[Bug fortran/31243] truncating strings longer than 2**32 characters
jb at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Apr 17 22:13:00 GMT 2009
------- Comment #6 from jb at gcc dot gnu dot org 2009-04-17 22:13 -------
I'm not sure how this could be fixed in a "proper way" without breaking the
procedure call ABI. Gfortran follows pretty much every other Fortran compiler
in providing character length as a hidden argument of type default integer.
In principle we could break this and make the length argument (s)size_t like
the string functions in C/C++ do, but that would probably be a major headache
for all those doing mixed C/Fortran programming the old fashioned way without
ISO_C_BINDING.
Of course, in principle one option could be to support larger strings as long
as no procedure calls are made, but that sounds pretty confusing and flaky
IMHO.
Considering that string sizes larger than 2**31 are pretty rare outside of
testcases, and IMHO not worth breaking the procedure call ABI for, the proper
resolution for this PR would be to just print out a "compiler limit" error
message like Thomas Koenig suggested.
--
jb at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jb at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31243
More information about the Gcc-bugs
mailing list