From: Jakub Jelinek Date: Mon, 25 Jun 2018 17:48:47 +0000 (+0200) Subject: backport: re PR rtl-optimization/85431 (UBSAN: ../../gcc/dse.c:303:15: runtime error... X-Git-Tag: releases/gcc-6.5.0~188 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eed2feb30e5072ce4e7f432fbbbf2f3175bbb21a;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: r262097 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c204f20647ab..6bafb746d894 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,11 @@ 2018-06-25 Jakub Jelinek Backported from mainline + 2018-04-17 Jakub Jelinek + + PR rtl-optimization/85431 + * dse.c (record_store): Ignore zero width stores. + 2018-04-10 Jakub Jelinek PR rtl-optimization/85300 diff --git a/gcc/dse.c b/gcc/dse.c index 48046ca46485..4eddcd1cf2af 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