This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: IPA merge 3: passmanager tweeks
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Graham Stott <graham dot stott at btinternet dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org, dnovillo at redhat dot com
- Date: Sat, 16 Dec 2006 22:31:53 +0100
- Subject: Re: IPA merge 3: passmanager tweeks
- References: <20061202145042.GM25179@kam.mff.cuni.cz> <45845FD8.9090907@btinternet.com>
> Jan,
>
> I'm finding that this patch breaks bootstrap on x86-pc-linux-gnu due
> triggering
>
> +===========================GNAT BUG
> DETECTED==============================+
> | 4.3.0 20061216 (experimental) (i686-pc-linux-gnu) GCC error:
> |
> | in execute_ipa_pass_list, at passes.c:983
> |
Hi,
interesitng, since I am pretty sure I tested the patch with ada in
Zdenek's tester.
It look slike the assert I added shows that Ada keep
current_function_decl set to some value after passing controll to the
backend. Since we already clear cfun variable before doing IPA
optimization, I guess the most robust fix is the following.
Does it work for you?
Honza
Index: cgraphunit.c
===================================================================
--- cgraphunit.c (revision 119965)
+++ cgraphunit.c (working copy)
@@ -1363,6 +1358,7 @@ static void
ipa_passes (void)
{
cfun = NULL;
+ current_function_decl = NULL;
tree_register_cfg_hooks ();
bitmap_obstack_initialize (NULL);
execute_ipa_pass_list (all_ipa_passes);