From: Jakub Jelinek Date: Sat, 6 Jan 2018 07:46:39 +0000 (+0100) Subject: re PR debug/83694 (New test case gcc.dg/pr83666.c from r256232 ICEs) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dba9c1fd276c07cd6a7cd432d71140931fa44c83;p=gcc.git re PR debug/83694 (New test case gcc.dg/pr83666.c from r256232 ICEs) PR middle-end/83694 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT. From-SVN: r256307 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a325a19a993..51f92bcf0b0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-06 Jakub Jelinek + + PR middle-end/83694 + * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode + and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT. + 2018-01-05 Jakub Jelinek PR target/83604 diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 72fd8fd5a76..2ee6fbac2e3 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -4534,8 +4534,12 @@ expand_debug_expr (tree exp) if (MEM_P (op0)) { if (mode1 == VOIDmode) - /* Bitfield. */ - mode1 = smallest_int_mode_for_size (bitsize); + { + if (maybe_gt (bitsize, MAX_BITSIZE_MODE_ANY_INT)) + return NULL; + /* Bitfield. */ + mode1 = smallest_int_mode_for_size (bitsize); + } poly_int64 bytepos = bits_to_bytes_round_down (bitpos); if (maybe_ne (bytepos, 0)) {