aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-opts.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2014-02-25 08:57:42 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2014-02-25 08:57:42 +0000
commit4094757e4be196c5a0f059e96ad149263c60555e (patch)
treef8e6f541c9aa135dc1f98fca81a46054249d5156 /gcc/lto-opts.c
parentadbdb8c76e9757634a688b093f6567d67b8b2498 (diff)
downloadgcc-4094757e4be196c5a0f059e96ad149263c60555e.zip
gcc-4094757e4be196c5a0f059e96ad149263c60555e.tar.gz
gcc-4094757e4be196c5a0f059e96ad149263c60555e.tar.bz2
re PR lto/60319 (wrong code (that hangs) by LTO at -Os and above on x86_64-linux-gnu)
2014-02-25 Richard Biener <rguenther@suse.de> 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
Diffstat (limited to 'gcc/lto-opts.c')
-rw-r--r--gcc/lto-opts.c12
1 files changed, 12 insertions, 0 deletions
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)