On 12/02/13 16:04, Jakub Jelinek wrote:
Hi!

Recent change to tree-object-size.c to fold stmts with immediate uses
of __builtin_object_size result broke the pass, because it now can
create new SSA_NAMEs and the code wasn't expecting that to happen.

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
ok for trunk?

2013-12-02  Jakub Jelinek  <ja...@redhat.com>

        PR tree-optimization/59362
        * tree-object-size.c (object_sizes): Change into array of
        vec<unsigned HOST_WIDE_INT>.
        (compute_builtin_object_size): Check computed bitmap for
        non-NULL instead of object_sizes.  Call safe_grow on object_sizes
        vector if new SSA_NAMEs appeared.
        (init_object_sizes): Check computed bitmap for non-NULL.
        Call safe_grow on object_sizes elements instead of initializing
        it with XNEWVEC.
        (fini_object_sizes): Call release on object_sizes elements, don't
        set it to NULL.

        * gcc.c-torture/compile/pr59362.c: New test.
OK.
Jeff

Reply via email to