This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/51313] [4.7 Regression][C++0x] ICE: tree check: expected class 'constant', have 'unary' (nop_expr) in null_ptr_cst_p, at cp/call.c:556


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51313

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-12-02 17:23:24 UTC ---
This badly requires a reduced testcase, I'm going to prepare one. Then the fix
should be pretty simple: just use STRIP_NOPs unconditionally, ie cxx0x too, in
null_ptr_cst_p?! Anything wrong with that?

The point is that integer_zerop strips the NOPs before doing its work, but then
TREE_OVERFLOW cannot handle a NOP_EXPR. I don't think we want TREE_OVERFLOW_P
and return false when integer_zerop returns true and no overflow is occurring!


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]