https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84899

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Jun 22 20:48:57 2018
New Revision: 261929

URL: https://gcc.gnu.org/viewcvs?rev=261929&root=gcc&view=rev
Log:
        Backported from mainline
        2018-03-16  Jakub Jelinek  <ja...@redhat.com>

        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:
    branches/gcc-7-branch/gcc/testsuite/gcc.dg/pr84899.c
Modified:
    branches/gcc-7-branch/gcc/ChangeLog
    branches/gcc-7-branch/gcc/postreload.c
    branches/gcc-7-branch/gcc/testsuite/ChangeLog

Reply via email to