]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/go/go-lang.c
Update copyright years.
[thirdparty/gcc.git] / gcc / go / go-lang.c
index a6bda936ed7675ffb10428eff58e81b1099d2388..387694e4f56d610aeda03e52059fc3aab83402df 100644 (file)
@@ -1,5 +1,5 @@
 /* go-lang.c -- Go frontend gcc interface.
-   Copyright (C) 2009-2019 Free Software Foundation, Inc.
+   Copyright (C) 2009-2020 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -297,8 +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.  */
+  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.  */
@@ -307,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;