This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] diagnostics branch
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: aldyh at redhat dot com (Aldy Hernandez)
- Cc: gcc-patches at gcc dot gnu dot org, rth at redhat dot com
- Date: Mon, 15 Jun 2009 15:54:11 +0200 (CEST)
- Subject: Re: [patch] diagnostics branch
Aldy Hernandez wrote:
> OK to merge into mainline?
>
> Below is the changelog, but the full patch (590k) is here:
>
> http://quesejoda.com/diagnostics-patch
The except.c (init_eh) changes in this patch causes the compiler to
crash on startup on SPU and presumably all other SJLJ-exception
targets:
Index: gcc/except.c
===================================================================
--- gcc/except.c (revision 148136)
+++ gcc/except.c (working copy)
@@ -221,11 +221,13 @@ init_eh (void)
sjlj_fc_type_node = lang_hooks.types.make_type (RECORD_TYPE);
- f_prev = build_decl (FIELD_DECL, get_identifier ("__prev"),
+ f_prev = build_decl (DECL_SOURCE_LOCATION (current_function_decl),
+ FIELD_DECL, get_identifier ("__prev"),
build_pointer_type (sjlj_fc_type_node));
DECL_FIELD_CONTEXT (f_prev) = sjlj_fc_type_node;
[...]
Note that init_eh is called during early initialization, where
current_function_decl is not yet set up. This causes a crash
due to NULL pointer access here ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com