On Thu, Sep 25, 2014 at 8:11 PM, Aldy Hernandez <al...@redhat.com> wrote: > push_cfun() fails when there's no cfun stack. With this patch, we use > set_cfun if not stack is available. > > This fixes the 16 Fortran guality regressions. > > Now guality tests all pass, for all languages. > > Committed to branch.
Hmm, I'd rather avoid push_cfun completely. It seems that mainline doesn't have it? Note that push_cfun also does target specific switching which shouldn't be necessary. Eventually dwarf2out.c wants some own "context"? That is, the type/decl part of dwarf2out.c should work solely with current_function_decl (which you can simply change/restore) while the backend part (locations, etc.) should work using cfun. So - please try dropping push_cfun as you set current_function_decl anyway. Richard.