https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105969

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Richard Biener
<rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:4f34a9e8d5ffcef99a212180d58718b00bdbb7d2

commit r12-8579-g4f34a9e8d5ffcef99a212180d58718b00bdbb7d2
Author: Richard Biener <rguent...@suse.de>
Date:   Wed Jun 15 10:54:48 2022 +0200

    tree-optimization/105969 - FPE with array diagnostics

    For a [0][0] array we have to be careful when dividing by the element
    size which is zero for the outermost dimension.  Luckily the division
    is only for an overflow check which is pointless for array size zero.

    2022-06-15  Richard Biener  <rguent...@suse.de>

            PR tree-optimization/105969
            * gimple-ssa-sprintf.cc (get_origin_and_offset_r): Avoid division
            by zero in overflow check.

            * gcc.dg/pr105969.c: New testcase.

    (cherry picked from commit edb9330c29fe8a0a0b76df6fafd6a223a4d0e41f)

Reply via email to