http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53681
--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> 2012-06-18 08:24:51 UTC --- On Mon, 18 Jun 2012, krebbel at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53681 > > --- Comment #5 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2012-06-18 > 07:09:04 UTC --- > (In reply to comment #4) > > I don't see how r187965 could cause this, but I do see the problem. > > mark_sym_for_renaming (called via the s390 va_arg_expr expander) is called > > during, well, gimplification from GENERIC. At that point SSA isn't > > initialized yet, so cfun->gimple_df is still NULL, and so SYMS_TO_RENAME > > gives a segfault. > > > > You either have to guard the call to mark_sym_for_renaming with > > gimple_in_ssa_p(), or get rid of the call alltogether. I don't see how > > new va_arg expressions would be generated during SSA optimizers, so the > > latter > > solution would be safe. No other backend calls mark_sym_for_renaming > > either, > > so just remove it. > > ?! You appear to have added the call to mark_sym_for_renaming with your patch. > Since it isn't mentioned in the changelog perhaps it is a leftover from > something else in your tree? So the solution is to revert that change? > > svn diff -r 187964:187965 gcc/config/s390/s390.c > Index: gcc/config/s390/s390.c > =================================================================== > --- gcc/config/s390/s390.c (revision 187964) > +++ gcc/config/s390/s390.c (revision 187965) > @@ -9044,6 +9044,7 @@ > lab_false = create_artificial_label (UNKNOWN_LOCATION); > lab_over = create_artificial_label (UNKNOWN_LOCATION); > addr = create_tmp_var (ptr_type_node, "addr"); > + mark_sym_for_renaming (addr); I think that change is indeed bogus as-is, if you ever call this when we are in SSA form you'd need that call, but you need to guard it with if (gimple_in_ssa_p (cfun)). But I'm sure we never gimplify va-arg stuff when in SSA form. Richard.