aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.cc
diff options
context:
space:
mode:
authorAndrew Pinski <apinski@marvell.com>2022-02-13 00:09:39 +0000
committerAndrew Pinski <apinski@marvell.com>2022-02-21 09:05:50 +0000
commite01530ec1e33f7df9c2acd0489d6d1f766cb1921 (patch)
treecbbef6e7711559b184bee3974a42b4361357f383 /gcc/alias.cc
parentc42f1e7734412c64e45a0fb0e519d40e144d6f9d (diff)
downloadgcc-e01530ec1e33f7df9c2acd0489d6d1f766cb1921.zip
gcc-e01530ec1e33f7df9c2acd0489d6d1f766cb1921.tar.gz
gcc-e01530ec1e33f7df9c2acd0489d6d1f766cb1921.tar.bz2
c: [PR104506] Fix ICE after error due to change of type to error_mark_node
The problem here is we end up with an error_mark_node when calling useless_type_conversion_p and that ICEs. STRIP_NOPS/tree_nop_conversion has had a check for the inner type being an error_mark_node since g9a6bb3f78c96 (2000). This just adds the check also to tree_ssa_useless_type_conversion. STRIP_USELESS_TYPE_CONVERSION is mostly used inside the gimplifier and the places where it is used outside of the gimplifier would not be adding too much overhead. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. Thanks, Andrew Pinski PR c/104506 gcc/ChangeLog: * tree-ssa.cc (tree_ssa_useless_type_conversion): Check the inner type before calling useless_type_conversion_p. gcc/testsuite/ChangeLog: * gcc.dg/pr104506-1.c: New test. * gcc.dg/pr104506-2.c: New test. * gcc.dg/pr104506-3.c: New test.
Diffstat (limited to 'gcc/alias.cc')
0 files changed, 0 insertions, 0 deletions