[Bug tree-optimization/64715] [5 Regression] __builtin_object_size (..., 1) fails to locate subobject

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 26 13:50:00 GMT 2015


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

--- Comment #21 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Mar 26 13:19:59 2015
New Revision: 221694

URL: https://gcc.gnu.org/viewcvs?rev=221694&root=gcc&view=rev
Log:
    PR tree-optimization/64715
    * passes.def: Add another instance of pass_object_sizes before
    ccp1.
    * tree-object-size.c (pass_object_sizes::execute): In
    first_pass_instance, only handle __bos (, 1) and __bos (, 3)
    calls, and keep the call in the IL, as {MIN,MAX}_EXPR of the
    __bos result and the computed constant.  Remove redundant
    checks, obsoleted by gimple_call_builtin_p test.

    * gcc.dg/builtin-object-size-15.c: New test.
    * gcc.dg/pr64715-1.c: New test.
    * gcc.dg/pr64715-2.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/builtin-object-size-15.c
    trunk/gcc/testsuite/gcc.dg/pr64715-1.c
    trunk/gcc/testsuite/gcc.dg/pr64715-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/passes.def
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-object-size.c



More information about the Gcc-bugs mailing list