On Mon, Nov 25, 2013 at 10:08 PM, Sriraman Tallam <tmsri...@google.com> wrote:
> I have attached a patch to fix this bug : > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58944 > > A similar problem was also reported here: > http://gcc.gnu.org/ml/gcc-patches/2013-11/msg01050.html > > > Recently, ix86_valid_target_attribute_tree in config/i386/i386.c was > refactored to not depend on global_options structure and to be able to > use any gcc_options structure. One clean way to fix this is by having > target_option_default_node save all the default target options which > can be restored to any gcc_options structure. The root cause of the > above bugs was that ix86_arch_string and ix86_tune_string was not > saved in target_option_deault_node in PR58944 and > ix86_preferred_stack_boundary_arg was not saved in the latter case. > > This patch saves all the target options used in i386.opt which are > either obtained from the command-line or set to some default. Is this > patch alright? Things looks rather complicated, but I see no other solution that save and restore the way you propose. Please wait 24h if somebody has a different idea, otherwise please go ahead and commit the patch to mainline. Thanks, Uros.