On Mon, Mar 04, 2013 at 06:11:24PM +0100, Martin Jambor wrote: > today I have noticed that get_or_create_ssa_default_def passes its > struct function parameter to ssa_default_def but then happily uses a > cfun-only make_ssa_name and even explicitely passes cfun to > set_ssa_default_def. Fixed with the patch below. > > Bootstrapped and tested on x86_64-linux. Given that all current > callers pass cfun as the first parameter I believe this is so low risk > that I'd like to commit it to trunk even though it does not really > cause any regression. However, I'm also fine with waiting for stage1. > What do you think?
I'd prefer to see it in 4.8, please check it in. Thanks. > 2013-03-04 Martin Jambor <mjam...@suse.cz> > > * tree-dfa.c (get_or_create_ssa_default_def): Use parameter fn in > all appropriate places. > > Index: src/gcc/tree-dfa.c > =================================================================== > --- src.orig/gcc/tree-dfa.c > +++ src/gcc/tree-dfa.c > @@ -362,8 +362,8 @@ get_or_create_ssa_default_def (struct fu > tree ddef = ssa_default_def (fn, var); > if (ddef == NULL_TREE) > { > - ddef = make_ssa_name (var, gimple_build_nop ()); > - set_ssa_default_def (cfun, var, ddef); > + ddef = make_ssa_name_fn (fn, var, gimple_build_nop ()); > + set_ssa_default_def (fn, var, ddef); > } > return ddef; > } Jakub