aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-streamer-in.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-streamer-in.c')
-rw-r--r--gcc/tree-streamer-in.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/tree-streamer-in.c b/gcc/tree-streamer-in.c
index a456709..2a8817b 100644
--- a/gcc/tree-streamer-in.c
+++ b/gcc/tree-streamer-in.c
@@ -800,11 +800,12 @@ lto_input_ts_function_decl_tree_pointers (class lto_input_block *ib,
tree opts = DECL_FUNCTION_SPECIFIC_OPTIMIZATION (expr);
if (opts)
{
- struct gcc_options tmp;
+ struct gcc_options tmp, tmp_set;
init_options_struct (&tmp, NULL);
- cl_optimization_restore (&tmp, TREE_OPTIMIZATION (opts));
- finish_options (&tmp, &global_options_set, UNKNOWN_LOCATION);
- opts = build_optimization_node (&tmp);
+ memset (&tmp_set, 0, sizeof (tmp_set));
+ cl_optimization_restore (&tmp, &tmp_set, TREE_OPTIMIZATION (opts));
+ finish_options (&tmp, &tmp_set, UNKNOWN_LOCATION);
+ opts = build_optimization_node (&tmp, &tmp_set);
DECL_FUNCTION_SPECIFIC_OPTIMIZATION (expr) = opts;
}
}