[Bug c/48685] [4.5/4.6/4.7 regression] ICE in gimplify_expr, at gimplify.c:7034
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 21 15:37:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48685
--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-04-21 15:36:26 UTC ---
The C front end should not depend on fold creating NON_LVALUE_EXPRs
anywhere, but I don't know if C++ has such dependencies. Where does the
NON_LVALUE_EXPR come from? In any case, I don't think NON_LVALUE_EXPR
should be used for type conversions; a NON_LVALUE_EXPR with void type
should only ever be used if the contained expression has void type (with
the same qualifiers), and under those conditions STRIP_TYPE_NOPS should
remove it.
c_fully_fold_internal needs to preserve the type of the expression, so
can't just remove a NON_LVALUE_EXPR that changes the type without adding
some other conversion to the new type - but as noted above, if a
NON_LVALUE_EXPR is changing the type I think the creation of that
NON_LVALUE_EXPR is what's wrong.
More information about the Gcc-bugs
mailing list