[Bug middle-end/105604] [10/11/12 Regression] ICE: in tree_to_shwi with vla in struct and sprintf

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 2 09:39:55 GMT 2022


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

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

https://gcc.gnu.org/g:740771a620f661800b99dfc039b8896e2ddb9265

commit r12-8450-g740771a620f661800b99dfc039b8896e2ddb9265
Author: Martin Sebor <msebor@redhat.com>
Date:   Tue May 24 16:01:12 2022 -0600

    PR middle-end/105604 - ICE: in tree_to_shwi with vla in struct and sprintf

    gcc/ChangeLog:

            PR middle-end/105604
            * gimple-ssa-sprintf.cc (set_aggregate_size_and_offset): Add
comments.
            (get_origin_and_offset_r): Remove null handling.  Handle variable
array
            sizes.
            (get_origin_and_offset): Handle null argument here.  Simplify.
            (alias_offset): Update comment.
            * pointer-query.cc (field_at_offset): Update comment.  Handle
members
            of variable-length types.

    gcc/testsuite/ChangeLog:

            PR middle-end/105604
            * gcc.dg/Wrestrict-24.c: New test.
            * gcc.dg/Wrestrict-25.c: New test.
            * gcc.dg/Wrestrict-26.c: New test.

    Co-authored-by: Richard Biener <rguenther@suse.de>
    (cherry picked from commit 10d1986aee47c592f903527bb68546efc557735d)


More information about the Gcc-bugs mailing list