From 4094757e4be196c5a0f059e96ad149263c60555e Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 25 Feb 2014 08:57:42 +0000 Subject: re PR lto/60319 (wrong code (that hangs) by LTO at -Os and above on x86_64-linux-gnu) 2014-02-25 Richard Biener PR lto/60319 * lto-opts.c (lto_write_options): Output non-explicit conservative -fwrapv, -fno-trapv and -fno-strict-overflow. * lto-wrapper.c (merge_and_complain): Handle merging those options. (run_gcc): And pass them through. From-SVN: r208112 --- gcc/lto-opts.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gcc/lto-opts.c') diff --git a/gcc/lto-opts.c b/gcc/lto-opts.c index 3f67572..06796d6 100644 --- a/gcc/lto-opts.c +++ b/gcc/lto-opts.c @@ -117,6 +117,18 @@ lto_write_options (void) default: gcc_unreachable (); } + /* We need to merge -f[no-]strict-overflow, -f[no-]wrapv and -f[no-]trapv + conservatively, so stream out their defaults. */ + if (!global_options_set.x_flag_wrapv + && global_options.x_flag_wrapv) + append_to_collect_gcc_options (&temporary_obstack, &first_p, "-fwrapv"); + if (!global_options_set.x_flag_trapv + && !global_options.x_flag_trapv) + append_to_collect_gcc_options (&temporary_obstack, &first_p, "-fno-trapv"); + if (!global_options_set.x_flag_strict_overflow + && !global_options.x_flag_strict_overflow) + append_to_collect_gcc_options (&temporary_obstack, &first_p, + "-fno-strict-overflow"); /* Output explicitly passed options. */ for (i = 1; i < save_decoded_options_count; ++i) -- cgit v1.1