On 09/01/2016 09:11 PM, Toshi Morita wrote:
I suspect when the C front-end parses (const int * const)0x1234, it fails to apply the const_tree attribute to the subtree, and this is why the optimization is failing.
The optimization is not failing—it results in *invalid code* if the compiler cannot observe that the pointer points to a const object. For pointers, const does not mean immutable.
Florian