diff options
Diffstat (limited to 'gcc/go')
-rw-r--r-- | gcc/go/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/go/go-lang.c | 20 |
2 files changed, 15 insertions, 10 deletions
diff --git a/gcc/go/ChangeLog b/gcc/go/ChangeLog index c62877f..eb1a03b 100644 --- a/gcc/go/ChangeLog +++ b/gcc/go/ChangeLog @@ -1,3 +1,8 @@ +2019-11-12 Martin Liska <mliska@suse.cz> + + * go-lang.c (go_langhook_post_options): + Use SET_OPTION_IF_UNSET. + 2019-09-04 Ian Lance Taylor <iant@golang.org> PR tree-optimization/91663 diff --git a/gcc/go/go-lang.c b/gcc/go/go-lang.c index 75d98933..8766372 100644 --- a/gcc/go/go-lang.c +++ b/gcc/go/go-lang.c @@ -297,13 +297,13 @@ go_langhook_post_options (const char **pfilename ATTRIBUTE_UNUSED) flag_excess_precision = EXCESS_PRECISION_STANDARD; /* Tail call optimizations can confuse uses of runtime.Callers. */ - if (!global_options_set.x_flag_optimize_sibling_calls) - global_options.x_flag_optimize_sibling_calls = 0; + SET_OPTION_IF_UNSET (&global_options, &global_options_set, + flag_optimize_sibling_calls, 0); /* Partial inlining can confuses uses of runtime.Callers. See https://gcc.gnu.org/PR91663. */ - if (!global_options_set.x_flag_partial_inlining) - global_options.x_flag_partial_inlining = 0; + SET_OPTION_IF_UNSET (&global_options, &global_options_set, + flag_partial_inlining, 0); /* If the debug info level is still 1, as set in init_options, make sure that some debugging type is selected. */ @@ -312,18 +312,18 @@ go_langhook_post_options (const char **pfilename ATTRIBUTE_UNUSED) global_options.x_write_symbols = PREFERRED_DEBUGGING_TYPE; /* We turn on stack splitting if we can. */ - if (!global_options_set.x_flag_split_stack - && targetm_common.supports_split_stack (false, &global_options)) - global_options.x_flag_split_stack = 1; + if (targetm_common.supports_split_stack (false, &global_options)) + SET_OPTION_IF_UNSET (&global_options, &global_options_set, + flag_split_stack, 1); /* If stack splitting is turned on, and the user did not explicitly request function partitioning, turn off partitioning, as it confuses the linker when trying to handle partitioned split-stack code that calls a non-split-stack function. */ if (global_options.x_flag_split_stack - && global_options.x_flag_reorder_blocks_and_partition - && !global_options_set.x_flag_reorder_blocks_and_partition) - global_options.x_flag_reorder_blocks_and_partition = 0; + && global_options.x_flag_reorder_blocks_and_partition) + SET_OPTION_IF_UNSET (&global_options, &global_options_set, + flag_reorder_blocks_and_partition, 0); /* Returning false means that the backend should be used. */ return false; |