]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
internal-fn: Fix up expand_arith_overflow [PR114753]
authorJakub Jelinek <jakub@redhat.com>
Fri, 19 Apr 2024 16:15:39 +0000 (18:15 +0200)
committerJakub Jelinek <jakub@redhat.com>
Fri, 19 Apr 2024 16:15:39 +0000 (18:15 +0200)
During backporting I've noticed I've missed one return spot for the
restoration of the original flag_trapv flag value.

2024-04-19  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/114753
* internal-fn.cc (expand_arith_overflow): Add one missing restore
of flag_trapv before return.

gcc/internal-fn.cc

index c7c5222a169c39c6fabc0f0bc5d060432bbc43bc..2c764441cde14d9537cd7b8a88c450e0cd70609b 100644 (file)
@@ -2793,6 +2793,7 @@ expand_arith_overflow (enum tree_code code, gimple *stmt)
            case PLUS_EXPR:
              expand_addsub_overflow (loc, code, lhs, arg0, arg1, unsr_p,
                                      unsr_p, unsr_p, false, NULL);
+             flag_trapv = save_flag_trapv;
              return;
            case MULT_EXPR:
              expand_mul_overflow (loc, lhs, arg0, arg1, unsr_p,