This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR 29585: C++ front end not setting TREE_ADDRESSABLE on vtbl entries
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 31 Mar 2007 11:08:09 -0700
- Subject: Re: PR 29585: C++ front end not setting TREE_ADDRESSABLE on vtbl entries
- References: <460EA260.3000404@redhat.com>
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 <dnovillo@redhat.com>
> Mark Mitchell <mark@codesourcery.com>
>
> 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
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713