diff mbox

[PR70366] fix chromium build failure with LTO due to segfault in inline_call

Message ID CAAgBjM=U-MgfPc+_t3YwAru+2D6c551KT_wyXss6WzSVWPZC9Q@mail.gmail.com
State New
Headers show

Commit Message

Prathamesh Kulkarni March 24, 2016, 2:43 p.m. UTC
Hi,
The following fix suggested by Richard fixes chromium build failing
due to segfault in inline_call.
Bootstrapped and tested on x86_64-unknown-linux-gnu.
Cross-tested on arm*-*-* and aarch64*-*-*.
Ok for trunk ?

Thanks,
Prathamesh
diff mbox

Patch

diff --git a/gcc/ipa-inline-transform.c b/gcc/ipa-inline-transform.c
index 5dc0b5a..f966fb0 100644
--- a/gcc/ipa-inline-transform.c
+++ b/gcc/ipa-inline-transform.c
@@ -329,8 +329,7 @@  inline_call (struct cgraph_edge *e, bool update_original,
     {
       struct gcc_options opts = global_options;
 
-      cl_optimization_restore (&opts,
-	 TREE_OPTIMIZATION (DECL_FUNCTION_SPECIFIC_OPTIMIZATION (to->decl)));
+      cl_optimization_restore (&opts, opts_for_fn (to->decl));
       opts.x_flag_strict_aliasing = false;
       if (dump_file)
 	fprintf (dump_file, "Dropping flag_strict_aliasing on %s:%i\n",