diff options
Diffstat (limited to 'gcc/opts.cc')
-rw-r--r-- | gcc/opts.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/opts.cc b/gcc/opts.cc index 959d48d..9982974 100644 --- a/gcc/opts.cc +++ b/gcc/opts.cc @@ -1122,6 +1122,10 @@ finish_options (struct gcc_options *opts, struct gcc_options *opts_set, opts->x_flag_no_inline = 1; } + /* At -O0 or -Og, turn __builtin_unreachable into a trap. */ + if (!opts->x_optimize || opts->x_optimize_debug) + SET_OPTION_IF_UNSET (opts, opts_set, flag_unreachable_traps, true); + /* Pipelining of outer loops is only possible when general pipelining capabilities are requested. */ if (!opts->x_flag_sel_sched_pipelining) |