+2019-09-18 Richard Biener <rguenther@suse.de>
+
+ PR lto/91763
+ * lto-streamer-in.c (input_eh_regions): Move EH init to
+ lto_materialize_function.
+ * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
+ Likewise.
+
2019-09-18 Richard Sandiford <richard.sandiford@arm.com>
* tree-ssa-ccp.c (get_value_for_expr): Check whether CONSTANTs
lto_tag_check_range (tag, LTO_eh_table, LTO_eh_table);
- /* If the file contains EH regions, then it was compiled with
- -fexceptions. In that case, initialize the backend EH
- machinery. */
- lto_init_eh ();
-
gcc_assert (fn->eh);
root_region = streamer_read_hwi (ib);
+2019-09-18 Richard Biener <rguenther@suse.de>
+
+ PR lto/91763
+ * lto.c (lto_materialize_function): Initialize EH by looking
+ at the function personality and flag_exceptions setting.
+
2019-08-23 Jakub Jelinek <jakub@redhat.com>
PR middle-end/91283
return;
if (DECL_FUNCTION_PERSONALITY (decl) && !first_personality_decl)
first_personality_decl = DECL_FUNCTION_PERSONALITY (decl);
+ /* If the file contains a function with a language specific EH
+ personality set or with EH enabled initialize the backend EH
+ machinery. */
+ if (DECL_FUNCTION_PERSONALITY (decl)
+ || opt_for_fn (decl, flag_exceptions))
+ lto_init_eh ();
}
/* Let the middle end know about the function. */
}
}
#endif
-
- /* If the file contains a function with an EH personality set,
- then it was compiled with -fexceptions. In that case, initialize
- the backend EH machinery. */
- if (DECL_FUNCTION_PERSONALITY (expr))
- lto_init_eh ();
}