]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/ipa-inline-transform.c
options: Save and restore opts_set for Optimization and Target options
[thirdparty/gcc.git] / gcc / ipa-inline-transform.c
index e9e21cc029669ef6df504873b901dbdc47647f61..5e37e612bfdd99bbd635f9212f6457876f140466 100644 (file)
@@ -380,14 +380,15 @@ inline_call (struct cgraph_edge *e, bool update_original,
       && opt_for_fn (to->decl, flag_strict_aliasing))
     {
       struct gcc_options opts = global_options;
+      struct gcc_options opts_set = global_options_set;
 
-      cl_optimization_restore (&opts, opts_for_fn (to->decl));
+      cl_optimization_restore (&opts, &opts_set, opts_for_fn (to->decl));
       opts.x_flag_strict_aliasing = false;
       if (dump_file)
        fprintf (dump_file, "Dropping flag_strict_aliasing on %s\n",
                 to->dump_name ());
       DECL_FUNCTION_SPECIFIC_OPTIMIZATION (to->decl)
-        = build_optimization_node (&opts);
+        = build_optimization_node (&opts, &opts_set);
       reload_optimization_node = true;
     }
 
@@ -420,8 +421,9 @@ inline_call (struct cgraph_edge *e, bool update_original,
             != opt_for_fn (to->decl, flag_errno_math))
        {
          struct gcc_options opts = global_options;
+         struct gcc_options opts_set = global_options_set;
 
-         cl_optimization_restore (&opts, opts_for_fn (to->decl));
+         cl_optimization_restore (&opts, &opts_set, opts_for_fn (to->decl));
          opts.x_flag_rounding_math
            = opt_for_fn (callee->decl, flag_rounding_math);
          opts.x_flag_trapping_math
@@ -448,7 +450,7 @@ inline_call (struct cgraph_edge *e, bool update_original,
            fprintf (dump_file, "Copying FP flags from %s to %s\n",
                     callee->dump_name (), to->dump_name ());
          DECL_FUNCTION_SPECIFIC_OPTIMIZATION (to->decl)
-            = build_optimization_node (&opts);
+            = build_optimization_node (&opts, &opts_set);
          reload_optimization_node = true;
        }
     }