This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] for "Re: Compilation at -O3 Still Broken"


Steven Bosscher <stevenb@suse.de> writes:

> Hi,
> 
> This fixes libjava's PR4766.java test case.
> 
> We were removing labels that were still referenced
> from exception region structs.  rth, are there other
> places you can think if that I've missed?
> 
> Bootstrapped and tested on x86_64-unknown-linux-gnu.
> OK for mainline?
> 
> Gr.
> Steven
> 
> 
> 	* except.c (for_each_eh_region): New function.
> 	* except.h (for_each_eh_region): Add a prototype for it.
> 	* tree-cfg.c (update_eh_labels): New function, callback for
> 	for_each_eh_region.
> 	(label_for_bb): Make global static, unfortunately.
> 	(cleanup_dead_labels): Also update label references for
> 	exception regions.
> 
> Index: except.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/except.c,v
> retrieving revision 1.271
> diff -c -3 -p -r1.271 except.c
> *** except.c	30 May 2004 07:12:48 -0000	1.271
> --- except.c	31 May 2004 21:53:42 -0000
> *************** for_each_eh_label_1 (void **pentry, void
> *** 2766,2771 ****
> --- 2766,2784 ----
>     (*callback) (entry->label);

 Should this be: callback (entry->label) ?

>     return 1;
>   }
> + 
> + /* Invoke CALLBACK for every exception region in the current function.  */
> + 
> + void
> + for_each_eh_region (void (*callback) (struct eh_region *))
> + {
> +   int i, n = cfun->eh->last_region_number;
> +   for (i = 1; i <= n; ++i)
> +     {
> +       struct eh_region *region = cfun->eh->region_array[i];
> +       (*callback) (region);
> +     }

 callback (region)?

-- 
Thanks,
Jim

http://www.student.cs.uwaterloo.ca/~ja2morri/
http://phython.blogspot.com
http://open.nit.ca/wiki/?page=jim


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]