From: Andrea Corallo Date: Thu, 18 Jun 2020 21:14:06 +0000 (+0200) Subject: * src/comp.c (Fcomp__compile_ctxt_to_file): Confine gcc optim level in [0, 3]. X-Git-Tag: emacs-28.0.90~2727^2~555 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=89b6f56de011fa45934800a60bf631fc99ef2a4c;p=emacs.git * src/comp.c (Fcomp__compile_ctxt_to_file): Confine gcc optim level in [0, 3]. --- diff --git a/src/comp.c b/src/comp.c index 82a092ad356..7547a40019d 100644 --- a/src/comp.c +++ b/src/comp.c @@ -4032,7 +4032,8 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file, gcc_jit_context_set_int_option (comp.ctxt, GCC_JIT_INT_OPTION_OPTIMIZATION_LEVEL, - COMP_SPEED); + COMP_SPEED < 0 ? 0 + : (COMP_SPEED > 3 ? 3 : COMP_SPEED)); comp.d_default_idx = CALL1I (comp-data-container-idx, CALL1I (comp-ctxt-d-default, Vcomp_ctxt)); comp.d_impure_idx =