summaryrefslogtreecommitdiff
path: root/gcc/analyzer/feasible-graph.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-07-25 17:24:57 +0200
committerRichard Biener <rguenther@suse.de>2022-07-27 11:23:45 +0200
commit5b8458bc35b5df34c1b4b8735975f2686444f6c8 (patch)
tree09faa5d7652bb7187be1f7067cdbe541a3c73097 /gcc/analyzer/feasible-graph.cc
parentd2892faac6d760ebc47f8f6ebee51e5cf6255cc8 (diff)
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. (cherry picked from commit bb04f9f23ac0dee2c003118c85372ece50a52220)
Diffstat (limited to 'gcc/analyzer/feasible-graph.cc')
0 files changed, 0 insertions, 0 deletions