[Bug tree-optimization/106189] [10/11/12/13 Regression] ICE: Floating point exception since r9-1948-gd893b683f40884cd
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 26 06:37:08 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106189
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:bb04f9f23ac0dee2c003118c85372ece50a52220
commit r13-1835-gbb04f9f23ac0dee2c003118c85372ece50a52220
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jul 25 17:24:57 2022 +0200
tree-optimization/106189 - avoid division by zero exception
The diagnostic code can end up with zero sized array elements
with T[][0] and the wide-int code nicely avoids exceptions when
dividing by zero in one codepath but not in another. The following
fixes the exception by using wide-int in both paths.
PR tree-optimization/106189
* gimple-array-bounds.cc (array_bounds_checker::check_mem_ref):
Divide using offset_ints.
* gcc.dg/pr106189.c: New testcase.
More information about the Gcc-bugs
mailing list