This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: rtx_unchanging_p vs c++ vtable fields
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 11 Dec 2001 19:25:22 -0800
- Subject: Re: rtx_unchanging_p vs c++ vtable fields
- References: <10112092323.AA15107@vlsi1.ultra.nyu.edu>
On Sun, Dec 09, 2001 at 06:23:36PM -0500, Richard Kenner wrote:
> I didn't think the field was marked TREE_READONLY, but I don't
> know for sure. It doesn't get marked readonly at the point of
> creation, but that doesn't mean it doesn't get set elsewhere.
>
> Well that's what readonly_fields_p tests, so if the code in question
> is triggered, it *must* have been set.
I've just checked -- the vtbl field is *not* marked read-only.
The same bug can be seen with
struct S
{
int x;
const int y;
};
void f(struct S *s)
{
s->x = 0;
}
(insn 11 5 12 (set (mem/s/u/j:SI (reg/v/f:DI 69) [0 <variable>.x+0 S4 A32])
(const_int 0 [0x0])) -1 (nil)
(nil))
The check here is being done on the containing type, as it is
expanded from the indirect_ref below the component_ref.
r~