C++ PATCH for c++/58814 (ICE with volatile vector)

Jason Merrill jason@redhat.com
Tue Jan 28 03:57:00 GMT 2014


stabilize_expr can't deal with a volatile vector variable; it tries to 
stabilize a glvalue with side-effects by storing its address in a 
temporary and then dereferencing that, but if the type of the reference 
is volatile then that doesn't actually help at all.

In this case, there's a simple solution: force the rhs to be an rvalue 
before trying to stabilize it.  In that case, stabilize_expr knows it 
can just copy the value into a temporary.

Tested x86_64-pc-linux-gnu, applying to trunk and 4.8.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 58814.patch
Type: text/x-patch
Size: 1083 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140128/34867893/attachment.bin>


More information about the Gcc-patches mailing list