[Bug tree-optimization/104970] [12 Regression] ICE in execute_todo, at passes.cc:2133 since r12-6480-gea19c8f33a3a8d2b

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 24 09:40:54 GMT 2022


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

--- Comment #11 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Siddhesh Poyarekar
<siddhesh@gcc.gnu.org>:

https://gcc.gnu.org/g:c1d233e3334df07cfb4f732ace4d93d3cbc28bca

commit r12-7794-gc1d233e3334df07cfb4f732ace4d93d3cbc28bca
Author: Siddhesh Poyarekar <siddhesh@gotplt.org>
Date:   Wed Mar 23 23:09:02 2022 +0530

    tree-optimization/104970: Limit size computation for access attribute

    Limit object size computation only to the simple case where access
    attribute has been explicitly specified.  The object passed to
    __builtin_dynamic_object_size could either be a pointer or a VLA whose
    size has been described using access attribute.

    Further, return a valid size only if the object is a void * pointer or
    points to (or is a VLA of) a type that has a constant size.

    gcc/ChangeLog:

            PR tree-optimization/104970
            * tree-object-size.cc (parm_object_size): Restrict size
            computation scenarios to explicit access attributes.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/104970
            * gcc.dg/builtin-dynamic-object-size-0.c (test_parmsz_simple2,
            test_parmsz_simple3, test_parmsz_extern, test_parmsz_internal,
            test_parmsz_internal2, test_parmsz_internal3): New tests.
            (main): Use them.

    Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>


More information about the Gcc-bugs mailing list