Merge pull request #39 from antoyo/fix/ira-cost-segfault · rust-lang/gcc@b334f15 (original) (raw)

Original file line number Diff line number Diff line change
@@ -2970,6 +2970,11 @@ ix86_option_override_internal (bool main_args_p,
2970 2970 = opts->x_flag_unsafe_math_optimizations;
2971 2971 target_option_default_node = target_option_current_node
2972 2972 = build_target_option_node (opts, opts_set);
2973 +// TODO: check if this is the correct location. It should probably be in some finalizer function, but I don't
2974 +// know if there's one.
2975 + target_attribute_cache[0] = NULL;
2976 + target_attribute_cache[1] = NULL;
2977 + target_attribute_cache[2] = NULL;
2973 2978 }
2974 2979
2975 2980 if (opts->x_flag_cf_protection != CF_NONE)