This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rtx_unchanging_p vs c++ vtable fields


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]