aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/generated/shape_i2.c
diff options
context:
space:
mode:
authorJanne Blomqvist <jb@gcc.gnu.org>2018-01-31 15:23:20 +0200
committerJanne Blomqvist <jb@gcc.gnu.org>2018-01-31 15:23:20 +0200
commit9f3dcd14146c29ca01507051ae9729a0f5569173 (patch)
tree739ec9feba8359bb7b7537197f70e7ec4aa29bab /libgfortran/generated/shape_i2.c
parent957a25ab0c76a2beb268aad005804da41e136c37 (diff)
downloadgcc-9f3dcd14146c29ca01507051ae9729a0f5569173.zip
gcc-9f3dcd14146c29ca01507051ae9729a0f5569173.tar.gz
gcc-9f3dcd14146c29ca01507051ae9729a0f5569173.tar.bz2
PR 78534 Reinstate better string copy algorithm
As part of the change to larger character lengths, the string copy algorithm was temporarily pessimized to get around some spurious -Wstringop-overflow warnings. Having tried a number of variations of this algorithm I have managed to get it down to one spurious warning, only with -O1 optimization, in the testsuite. This patch reinstates the optimized variant and modifies this one testcase to ignore the warning. Regtested on x86_64-pc-linux-gnu. gcc/fortran/ChangeLog: 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/78534 * trans-expr.c (fill_with_spaces): Use memset instead of generating loop. (gfc_trans_string_copy): Improve opportunity to use builtins with constant lengths. gcc/testsuite/ChangeLog: 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org> PR fortran/78534 * gfortran.dg/allocate_deferred_char_scalar_1.f03: Prune -Wstringop-overflow warnings due to spurious warning with -O1. * gfortran.dg/char_cast_1.f90: Update dump scan pattern. * gfortran.dg/transfer_intrinsic_1.f90: Likewise. From-SVN: r257233
Diffstat (limited to 'libgfortran/generated/shape_i2.c')
0 files changed, 0 insertions, 0 deletions