diff options
Diffstat (limited to 'gcc/lto-opts.c')
-rw-r--r-- | gcc/lto-opts.c | 12 |
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) |