re PR target/84899 (ICE: in final_scan_insn_1, at final.c:3139 (error: could not...
authorJakub Jelinek <jakub@redhat.com>
Fri, 16 Mar 2018 21:01:16 +0000 (22:01 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 16 Mar 2018 21:01:16 +0000 (22:01 +0100)
commit927fb0bc9b915bbe32b4d137adbbcdd3375e119a
tree6b3bc9dd4c8e250c0bf6a184d3e767e7be181185
parentce811fc49bb470856f6c4953c071d5b3db6485bb
re PR target/84899 (ICE: in final_scan_insn_1, at final.c:3139 (error: could not split insn))

PR target/84899
* postreload.c (reload_combine_recognize_pattern): Perform
INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
truncate_int_for_mode the result for the destination's mode.

* gcc.dg/pr84899.c: New test.

From-SVN: r258610
gcc/ChangeLog
gcc/postreload.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr84899.c [new file with mode: 0644]