From: Jakub Jelinek Date: Fri, 22 Jun 2018 21:11:28 +0000 (+0200) Subject: backport: re PR rtl-optimization/85431 (UBSAN: ../../gcc/dse.c:303:15: runtime error... X-Git-Tag: releases/gcc-7.4.0~334 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50f8ab99c8a05a9cf2fa7a50d475623c50123903;p=thirdparty%2Fgcc.git backport: re PR rtl-optimization/85431 (UBSAN: ../../gcc/dse.c:303:15: runtime error: shift exponent 64 is too large for 64-bit type 'long unsigned int') Backported from mainline 2018-04-17 Jakub Jelinek PR rtl-optimization/85431 * dse.c (record_store): Ignore zero width stores. From-SVN: r261955 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 52232caf7a14..6be713635848 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -3,6 +3,9 @@ Backported from mainline 2018-04-17 Jakub Jelinek + PR rtl-optimization/85431 + * dse.c (record_store): Ignore zero width stores. + PR target/85430 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu. diff --git a/gcc/dse.c b/gcc/dse.c index f87dd50024e8..174865bbc40b 100644 --- a/gcc/dse.c +++ b/gcc/dse.c @@ -1342,6 +1342,9 @@ record_store (rtx body, bb_info_t bb_info) else width = GET_MODE_SIZE (GET_MODE (mem)); + if (width == 0) + return 0; + if (group_id >= 0) { /* In the restrictive case where the base is a constant or the