[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: [Bug c/83634] [8 Regression] ICE in useless_type_conversion_p, at gimple-expr.c:86
From: "jakub at gcc dot gnu.org" <gcc-bugzilla () gcc ! gnu ! org>
Date: 2017-12-31 14:09:49
Message-ID: bug-83634-4-45InOEzL2J () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83634
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The reason we end up with CONVERT_EXPR from error_mark_node to void is that
cp_fold ignores casts to void:
case CONVERT_EXPR:
case NOP_EXPR:
case NON_LVALUE_EXPR:
if (VOID_TYPE_P (TREE_TYPE (x)))
return x;
and thus the operand is handled only by cp_fold_r and doesn't have the
possibility to turn the whole CONVERT_EXPR into error_mark_node.
So, either we should get rid of this (and for VOID_TYPE_P perhaps just
cp_fold_rvalue and build the conversion if the folding returned something
different (and special case if it returned error_mark_node), or we need the
gimplifier to handle this. The reason why it doesn't handle it is that while
STRIP_NOPS or STRIP_SIGN_NOPS have checks for error_mark_node,
STRIP_USELESS_TYPE_CONVERSION doesn't. So, either we do add the ==
error_mark_node comparison in there, or use a copy of that in the gimplifier
which will do the error_mark_node checks.=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic