]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix UB in int_const_binop
authorRichard Sandiford <richard.sandiford@arm.com>
Thu, 18 Apr 2019 12:30:36 +0000 (12:30 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 18 Apr 2019 12:30:36 +0000 (12:30 +0000)
commit714996e2c2e1fd788c87b3a87648977468ad4251
treebe03f26d6f967997c007886d0080a9d364a3f1e2
parentcd7f7c54a43c435152b2ac76b6e74ae6a3430472
Fix UB in int_const_binop

When testing PR 85164, the baseline bootstrap-ubsan results had
a lot of failures from int_const_binop.  This is because with the
new overflow handling we can sometimes do:

      poly_res = res;

on an uninitialised res.

2019-04-18  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* fold-const.c (int_const_binop): Return early on failure.

From-SVN: r270443
gcc/ChangeLog
gcc/fold-const.c