http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46037
--- Comment #19 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-01-11
16:32:00 UTC ---
Why not retain the original code behavior unless generating lto? The patch
below works with both a standard and lto-bootstrap on x86_64-apple-darwin10.
Index: gcc/config/darwin.c
===================================================================
--- gcc/config/darwin.c (revision 168662)
+++ gcc/config/darwin.c (working copy)
@@ -2618,7 +2618,8 @@
if (flag_var_tracking
&& (generating_for_darwin_version >= 9)
&& debug_info_level >= DINFO_LEVEL_NORMAL
- && debug_hooks->var_location != do_nothing_debug_hooks.var_location)
+ && (flag_generate_lto ? (write_symbols == DWARF2_DEBUG)
+ : (debug_hooks->var_location != do_nothing_debug_hooks.var_location)))
flag_var_tracking_uninit = 1;
if (MACHO_DYNAMIC_NO_PIC_P)