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)) {