https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84899
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Mar 16 21:01:16 2018 New Revision: 258610 URL: https://gcc.gnu.org/viewcvs?rev=258610&root=gcc&view=rev Log: 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. Added: trunk/gcc/testsuite/gcc.dg/pr84899.c Modified: trunk/gcc/ChangeLog trunk/gcc/postreload.c trunk/gcc/testsuite/ChangeLog