This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch PING: PR middle-end/21362: ICE in make_edges, at cfgbuild.c:327
- From: Andrew Haley <aph at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: konqueror at gmx dot de, gcc-patches at gcc dot gnu dot org
- Date: Mon, 15 May 2006 15:01:46 +0100
- Subject: Re: Patch PING: PR middle-end/21362: ICE in make_edges, at cfgbuild.c:327
- References: <17018.17534.272171.27694@cuddles.cambridge.redhat.com> <200505130913.j4D9DTPD011972@littlepinkcloud.com> <20050517003529.GA31389@redhat.com> <17033.46512.993146.352214@cuddles.pink> <20050517235928.GA2146@redhat.com>
Richard Henderson writes:
> On Tue, May 17, 2005 at 10:13:20AM +0100, Andrew Haley wrote:
> > Sure it is. The instruction in the PR is
> >
> > $ gcj -findirect-dispatch -shared bork.jar # works
>
> Ah, I missed the -findirect-dispatch. Omit that and you get
>
> org/apache/catalina/session/FileStore.java:0: error: cannot find file \
> for class org.apache.catalina.session.StoreBase
> org/apache/catalina/session/FileStore.java:0: error: cannot find file \
> for class org.apache.catalina.Store
> org/apache/catalina/session/FileStore.java:0: error: cannot find file \
> for class org.apache.catalina.session.StoreBase
>
> which is why I assumed the test case was incomplete.
>
> Yes, I can reproduce the problem now.
>
> I think I prefer to do this in the cfg routines, for the sole reason
> that I'm sure we've checked the CFG and we're really sure that there
> are no more incoming edges. Putting this in delete_insn might make
> some old ugly non-cfg aware code silently "work" but in the process
> break program semantics.
>
> The following works for this test case. I'll run it through a full
> test cycle here in moment.
Hmm. Although the particular ICE that caused this PR is gone, an
adjacent file in the same archive triggers a suspiciously similar
failure in the same area of the compiler.
Please have a look at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27590.
Andrew.
> Index: cfgrtl.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/cfgrtl.c,v
> retrieving revision 1.158
> diff -u -p -d -r1.158 cfgrtl.c
> --- cfgrtl.c 14 Feb 2005 11:37:52 -0000 1.158
> +++ cfgrtl.c 17 May 2005 23:55:31 -0000
> @@ -527,6 +527,10 @@ rtl_merge_blocks (basic_block a, basic_b
> /* If there was a CODE_LABEL beginning B, delete it. */
> if (LABEL_P (b_head))
> {
> + /* This might have been an EH label that no longer has incoming
> + EH edges. Update data structures to match. */
> + maybe_remove_eh_handler (b_head);
> +
> /* Detect basic blocks with nothing but a label. This can happen
> in particular at the end of a function. */
> if (b_head == b_end)
> @@ -2749,7 +2753,10 @@ cfg_layout_merge_blocks (basic_block a,
>
> /* If there was a CODE_LABEL beginning B, delete it. */
> if (LABEL_P (BB_HEAD (b)))
> - delete_insn (BB_HEAD (b));
> + {
> + maybe_remove_eh_handler (BB_HEAD (b));
> + delete_insn (BB_HEAD (b));
> + }
>
> /* We should have fallthru edge in a, or we can do dummy redirection to get
> it cleaned up. */