C++ PATCH for c++/56728 (ICE with bogus constexpr function)

Jason Merrill jason@redhat.com
Thu Mar 28 18:09:00 GMT 2013


In this testcase we were crashing because after function argument 
substitution in the initialization for crashnkill we couldn't figure out 
how to simplify *(Inner*)4, so we went back to bridge2.  It certainly 
doesn't make sense for the initializer to refer to a parameter for a 
function called in the initializer, so the back end correctly blew up. 
The cxx_eval_indirect_ref hunk addresses this by returning the expanded 
version of the operand rather than the original one.

The other two hunks address the issue that the getInner function is not 
a valid constexpr function, because it involves a reinterpret_cast from 
integer to pointer.

Tested x86_64-pc-linux-gnu, applying to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 56728.patch
Type: text/x-patch
Size: 2911 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20130328/6d0567ad/attachment.bin>


More information about the Gcc-patches mailing list