C++ PATCH for c++/68206, 68530 (ICE with loop in constexpr)

Jason Merrill jason@redhat.com
Tue Apr 19 18:44:00 GMT 2016


Well-formed C++14 code with a loop in a constexpr function works fine, 
but we were crashing while trying to diagnose an unsuitable constexpr 
function because potential_constant_expression_1 didn't understand loops.

The second patch improves constexpr handling of EXIT_EXPR and loops 
around COMPOUND_EXPR rather than STATEMENT_LIST.  This is not currently 
necessary, but might be in future.

Tested x86_64-pc-linux-gnu, applying to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 68206.patch
Type: text/x-patch
Size: 1725 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160419/eacd2dc8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cx-loop.patch
Type: text/x-patch
Size: 2216 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160419/eacd2dc8/attachment-0001.bin>


More information about the Gcc-patches mailing list