PR 29585: C++ front end not setting TREE_ADDRESSABLE on vtbl entries

Mark Mitchell
Sat Mar 31 20:01:00 GMT 2007

Diego Novillo wrote:

> 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.

FWIW, I think what you're suggesting is The Right Thing for 4.3.  In the
old days, the addressability of things whose addresses were not really
needed did impact optimization a lot, but I don't see that this should
be true with our new infrastructure.  Look, if you take its address, it
must be addressable. :-p

> 2007-03-30  Diego Novillo  <>
>             Mark Mitchell  <>
> 	PR 29585
> 	* class.c (dfs_accumulate_vtbl_inits): Use build_address
> 	to build the vtbl entry.
> testsuite/ChangeLog
> 	PR 29585
> 	* g++.dg/tree-ssa/pr29585.C: New test.

OK, and thanks!!

Mark Mitchell
(650) 331-3385 x713

More information about the Gcc-patches mailing list