This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][0/2] Crude debug language selection for LTO
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: jason at redhat dot com
- Date: Fri, 17 Sep 2010 13:21:05 +0200 (CEST)
- Subject: [PATCH][0/2] Crude debug language selection for LTO
Even though some frontends can create TRANSLATION_UNIT_DECLs
(notably the C frontend when -combine was used), dwarf2out happily
ICEs in force_decl_die for them (noticed with my Fortran patch
adding TRANSLATION_UNIT_DECL DECL_CONTEXT for globals).
Fixed by the following, bootstrapped and tested on
x86_64-unknown-linux-gnu (with the Fortran patch), ok?
Thanks,
Richard.
2010-09-17 Richard Guenther <rguenther@suse.de>
* dwarf2out.c (force_decl_die): Handle TRANSLATION_UNIT_DECL.
Index: trunk/gcc/dwarf2out.c
===================================================================
*** trunk.orig/gcc/dwarf2out.c 2010-09-17 12:58:58.000000000 +0200
--- trunk/gcc/dwarf2out.c 2010-09-17 13:18:37.000000000 +0200
*************** force_decl_die (tree decl)
*** 20443,20448 ****
--- 20443,20452 ----
decl_die = comp_unit_die ();
break;
+ case TRANSLATION_UNIT_DECL:
+ decl_die = comp_unit_die ();
+ break;
+
default:
gcc_unreachable ();
}