aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/async.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2018-07-25 08:41:35 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2018-07-25 08:41:35 +0000
commite8dce850a7ffcffff4690f62f85e0ed4ede4d82a (patch)
tree9f721d74a8a88c9af1612dc3c67cdb9f9aa32b6b /libgfortran/io/async.c
parentde6c8d7f72822c579ff07382d74ecb5c142a49b2 (diff)
downloadgcc-e8dce850a7ffcffff4690f62f85e0ed4ede4d82a.zip
gcc-e8dce850a7ffcffff4690f62f85e0ed4ede4d82a.tar.gz
gcc-e8dce850a7ffcffff4690f62f85e0ed4ede4d82a.tar.bz2
Fix ceil_log2(0) (PR 86644)
This PR shows a pathological case in which we try SLP vectorisation on dead code. We record that 0 bits of the result are enough to satisfy all users (which is true), and that led to precision being 0 in: static unsigned int vect_element_precision (unsigned int precision) { precision = 1 << ceil_log2 (precision); return MAX (precision, BITS_PER_UNIT); } ceil_log2 (0) returned 64 rather than 0, leading to 1 << 64, which is UB. 2018-07-25 Richard Sandiford <richard.sandiford@arm.com> gcc/ * hwint.c (ceil_log2): Fix comment. Return 0 for 0. From-SVN: r262961
Diffstat (limited to 'libgfortran/io/async.c')
0 files changed, 0 insertions, 0 deletions