aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.cc
diff options
context:
space:
mode:
authorJoseph Myers <josmyers@redhat.com>2024-11-28 02:41:35 +0000
committerJoseph Myers <josmyers@redhat.com>2024-11-28 02:41:35 +0000
commit24dac1eab9c3b650826bbaa84dd64310910e647c (patch)
tree7e1f9aab048e1404bcabd8e95bf956b250702b61 /gcc/expr.cc
parent066f309db6a545a7ee0a266018abac60ce7143d9 (diff)
downloadgcc-24dac1eab9c3b650826bbaa84dd64310910e647c.zip
gcc-24dac1eab9c3b650826bbaa84dd64310910e647c.tar.gz
gcc-24dac1eab9c3b650826bbaa84dd64310910e647c.tar.bz2
c: Fix gimplification ICE for shifts with invalid redeclarations
As reported in bug 117757, there is a C gimplification ICE for shifts involving a variable that was incompatibly redeclared (and thus had its type changed to error_mark_node). Fix this with an appropriate error_operand_p check. Note that this is not the same issue as any of the other bugs reported for ICEs later in the gimplifier dealing with such erroneous redeclarations (it is, however, the same as the *second* ICE reported in bug 115644 - the test in comment#1 for that bug, not the one in the original bug report). Bootstrapped with no regressions for x86_64-pc-linux-gnu. PR c/117757 gcc/c-family/ * c-gimplify.cc (c_gimplify_expr): Check for error_operand_p before calling TYPE_MAIN_VARIANT for shifts. gcc/testsuite/ * gcc.dg/pr117757-1.c: New test.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions