This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix PR52178
On Wed, 15 Feb 2012, Eric Botcazou wrote:
> > This fixes PR52178, the failure to bootstrap Ada with LTO (well,
> > until you hit the next problem). A self-referential DECL_QUALIFIER
> > makes us think that a QUAL_UNION_TYPE type is of variable-size which
> > makes us stream that type locally, wrecking type merging and later
> > ICEing in the type verifier. While it looks that variably_modified_type_p
> > should not inspect DECL_QUALIFIER a less intrusive patch for 4.7
> > notices that DECL_QUALIFIER is unused after gimplification and thus
> > clears it and does not stream it instead.
> Thanks for fixing the hard part. Here is the easy one: the compiler aborts
> during the CDDCE2 pass of LTRANS when it is trying to redirect an edge from a
> dead control statement to the immediate post-dominator of the BB.
> It turns out that the control statement isn't dead at all, but its two edges
> point to fallthrough (empty) basic blocks which have sticky abnormal edges
> to another block.
> The blocks used to contain a call statement:
> <bb 1584>:
> D.57021_4455 = sinfo__etype (this_formal_84(ab));
> which was replaced by FRE with an assignment:
> <bb 1567>:
> D.57021_4455 = D.57006_4425;
> which was eventually eliminated by DCE1.
> FRE has all the machinery to deal with this case and purge the dead abnormal
> edges. But there is a hitch: the CFG may have changed between the time the
> need for the cleanup is detected and the time it is performed, which fools
> the logic. The issue has been latent for years and becomes visible only now
> because we have both EH and AB edges in gnat1 (thanks to TREE_CLOBBER_P).
> Bootstrapped/regtested on x86_64-suse-linux, applied on the mainline as obvious
> (together with the no-op patchlet to gimple.c we discussed in the PR).
Thanks for hunting this down!
> 2012-02-14 Eric Botcazou <email@example.com>
> PR lto/52178
> * gimple.c (iterative_hash_gimple_type): Use RECORD_OR_UNION_TYPE_P.
> (iterative_hash_canonical_type): Likewise.
> * tree-ssa-pre.c (fini_pre): Clean up the CFG only after purging all
> the dead edges.