PR tree-optimization/45605
Martin Jambor
mjambor@suse.cz
Fri Sep 17 11:04:00 GMT 2010
Hi,
On Fri, Sep 17, 2010 at 01:48:12AM +0200, Jan Hubicka wrote:
> Hi,
> this patch fixes missed devirtualization seen in the attached testcase.
> (shamelessly stolen from the testsuite).
please generate your patches with the -p switch, this one is short but
often I get lost rather easily without it.
>
...
> Index: gimplify.c
> ===================================================================
> --- gimplify.c (revision 164344)
> +++ gimplify.c (working copy)
> @@ -2479,8 +2479,11 @@
> {
> /* The CALL_EXPR in *EXPR_P is already in GIMPLE form, so all we
> have to do is replicate it as a GIMPLE_CALL tuple. */
> + gimple_stmt_iterator gsi;
> call = gimple_build_call_from_tree (*expr_p);
> gimplify_seq_add_stmt (pre_p, call);
> + gsi = gsi_last (*pre_p);
> + fold_stmt (&gsi);
> *expr_p = NULL_TREE;
> }
I have just checked and we fold the OBJ_TYPE_REF even at -O0, is that
something we want to do?
Thanks,
Martin
More information about the Gcc-patches
mailing list