Fortran: speed up decimal output of integers
authorFrancois-Xavier Coudert <fxcoudert@gmail.com>
Sun, 26 Dec 2021 10:59:14 +0000 (11:59 +0100)
committerFrancois-Xavier Coudert <fxcoudert@gmail.com>
Sun, 26 Dec 2021 11:00:00 +0000 (12:00 +0100)
commit9525c26bf19318bed72d3bc3b99dceac5217102f
tree8ce575df2473b27132d04ecf9dc8de8f1730b953
parent10ae9946dce5fec3702cb3f18f3aa51dc6dff9c4
Fortran: speed up decimal output of integers

libgfortran/ChangeLog:

PR libfortran/98076
* runtime/string.c (itoa64, itoa64_pad19): New helper functions.
(gfc_itoa): On targets with 128-bit integers, call fast
64-bit functions to avoid many slow divisions.

gcc/testsuite/ChangeLog:

PR libfortran/98076
* gfortran.dg/pr98076.f90: New test.
gcc/testsuite/gfortran.dg/pr98076.f90 [new file with mode: 0644]
libgfortran/runtime/string.c