http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46037

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at redhat dot com

--- Comment #8 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-01-11 
00:07:08 UTC ---
I guess it is decode options.  But I wonder how we manage to play this
ping-pong game.  I see darwin.c setting the uninit:

  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_var_tracking_uninit = 1;

and toplev.c clearing it:

  /* We know which debug output will be used so we can set flag_var_tracking
     and flag_var_tracking_uninit if the user has not specified them.  */
  if (debug_info_level < DINFO_LEVEL_NORMAL
      || debug_hooks->var_location == do_nothing_debug_hooks.var_location)
    { 
      if (flag_var_tracking == 1
          || flag_var_tracking_uninit == 1)
        { 
          if (debug_info_level < DINFO_LEVEL_NORMAL)
            warning (0, "variable tracking requested, but useless unless "
                     "producing debug info");
          else
            warning (0, "variable tracking requested, but not supported "
                     "by this debug format");
        }
      flag_var_tracking = 0;
      flag_var_tracking_uninit = 0;
    }

First time we go
process_options->darwin_override_options and we end up with flag disabled
(can't verify as I am not big friend with Jack's gdb)
next time we go
#0  0x00000001009edb40 in darwin_override_options ()
#1  0x000000010099b120 in ix86_option_override_internal ()
#2  0x000000010099f15b in ix86_valid_target_attribute_tree ()
#3  0x000000010099f25b in ix86_valid_target_attribute_p ()
#4  0x000000010007ac04 in handle_target_attribute ()
#5  0x00000001000024ca in decl_attributes ()
this time we bypass process_options.

I don't see how those two conditionals can both match.


I also wonder why is darwin enabling the flag? 
It seems to be off at all configurations except for darwin even if looks like
generic var tracking feature.  -fvar-tracking-uninit is also undocumented.

Reply via email to