aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgexpand.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-01-06 08:46:39 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-01-06 08:46:39 +0100
commitdba9c1fd276c07cd6a7cd432d71140931fa44c83 (patch)
treee71a32c3cebc8a1c385d88f243f84e370841da60 /gcc/cfgexpand.c
parent319e41dc77e31f3ece720ec37853ffbcc4a0df25 (diff)
downloadgcc-dba9c1fd276c07cd6a7cd432d71140931fa44c83.zip
gcc-dba9c1fd276c07cd6a7cd432d71140931fa44c83.tar.gz
gcc-dba9c1fd276c07cd6a7cd432d71140931fa44c83.tar.bz2
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
Diffstat (limited to 'gcc/cfgexpand.c')
-rw-r--r--gcc/cfgexpand.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 72fd8fd..2ee6fba 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))
{