PR 29585: C++ front end not setting TREE_ADDRESSABLE on vtbl entries
Diego Novillo
dnovillo@redhat.com
Sat Mar 31 19:50:00 GMT 2007
As discussed in http://gcc.gnu.org/ml/gcc/2007-03/msg01153.html, the C++
front end is building ADDR_EXPRs for vtbl entries but is not setting
TREE_ADDRESSABLE consistently.
This is causing the setup routines in alias analysis to ignore these
variables. But during analysis, we add them to points-to and alias
sets. Since the variables had been initially ignored, they don't get
marked for renaming, causing an ICE during conversion to SSA.
The approach I tried initially is to make the aliaser very strict in
asserting the addressability of every symbol added to an alias set.
This uncovers various inconsistencies in C, C++ and Java FEs. So, the
idea is to make everything consistent by forcing build1() to set
TREE_ADDRESSABLE every time it's asked to build ADDR_EXPR. This caused
some controversy, so I will not attempt that on 4.2.
The minimal fix that I found for 4.2 is along the lines of what Mark and
Jason suggested. I did have to try a variation of Mark's suggestion of
building a NOP_EXPR in dfs_accumulate_vtbl_inits, because that was
causing ICEs elsewhere in other functions not expecting a NOP_EXPR.
Bootstrapped on i686, x86_64, ppc64 and ia64.
OK for 4.2? For 4.3 I will use the sane approach of forcing
TREE_ADDRESSABLE for every ADDR_EXPR built.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20070330-29585.diff
Type: text/x-patch
Size: 1274 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070331/affbb54d/attachment.bin>
More information about the Gcc-patches
mailing list