refinements to definition of TREE_READONLY ?
Olivier Hainque
hainque@adacore.com
Fri Jul 11 16:20:00 GMT 2008
Hello,
According to comments in PR/35493, when DECL_INITIAL is null on a
TREE_READONLY decl, the middle-end may assume the value to be zero.
This is not explicit from the current definitions in tree.h, we'd
like to understand if this is actually the case and to suggest a doc
extension to this effect.
We'd also like to get to an agreement on what TREE_READONLY means on a
decl with non static storage, if anything at all.
The kind of issues we're seeing is ...
Ada front-end sets TREE_RO and DECL_INITIAL on a stack decl with
initializer but never assigned later on,
gimplify_decl_expr turns this into an explicit assignment,
clears DECL_INITIAL and leaves TREE_RO set (creating an
unexpected assignment with TREE_RO on the lhs).
later middle-end passes (e.g. tree-sra) turn this into an
assignment from 0 (null DECL_INITIAL).
Thanks in advance for your feedback,
Olivier
More information about the Gcc
mailing list