[Patch, Fortran, committed] Minor %(l)ld fix, move td.deferred check earlier
Tobias Burnus
burnus@net-b.de
Sat Dec 10 20:14:00 GMT 2011
Hi all,
I have committed (Rev. 182190) the attached patch as obvious.
a) In one case, gfortran was using "%lld" with "long" instead of "%ld"
(or instead of long long).
The proper data type would be something like ptrdiff_t, long long or
similar. However, different systems require different printfs, e.g. %lld
or %I64. Thus, we use here "%ld" with "long" even though it might be
only 32bits instead of 64bits (on systems with 64 bit pointers). (That's
pattern is also used in trans-arrays.c and other files.) As the value is
used for array shapes and similar out-of-bound failures, casting a 64bit
value to 32bit for the run-time error message is usually possible
without information loss.
The proper solution would be to use something like
TARGET_WIDE_INT_PRINT_DEC, which does not exist so far. (Only
HOST_WIDE_INT_PRINT_DEC exists.)
b) Mikael had ask me to move ts.deferred up in the file, which I didn't
do in the original commit - but which I do now with this commit. Cf.
http://gcc.gnu.org/ml/fortran/2011-12/msg00045.html
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: commit.diff
Type: text/x-patch
Size: 2317 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111210/95d445d6/attachment.bin>
More information about the Fortran
mailing list