re PR middle-end/67485 (expmed.c sanitizer detects overflow)
authorJakub Jelinek <jakub@redhat.com>
Tue, 16 Aug 2016 16:48:16 +0000 (18:48 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 16 Aug 2016 16:48:16 +0000 (18:48 +0200)
commit1b13411a13e274d5e01b73704df9edd2639eedb4
tree89718b908de8516c29a214667bdc12cc31bcaaf8
parent4a7f57d5390a3afbd5f1dc5050c409fbf1a34e54
re PR middle-end/67485 (expmed.c sanitizer detects overflow)

PR middle-end/67485
* expmed.c (expand_mult_const): Change val_so_far's type to UHWI,
only cast it to SHWI for the final comparison.

* gcc.c-torture/compile/pr67485.c: New test.

From-SVN: r239507
gcc/ChangeLog
gcc/expmed.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr67485.c [new file with mode: 0644]