https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87188

--- Comment #8 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to dave.anglin from comment #7)
> On 2018-09-05 4:55 AM, jamborm at gcc dot gnu.org wrote:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87188
> >
> > --- Comment #6 from Martin Jambor <jamborm at gcc dot gnu.org> ---
> > I cannot see anything wrong with the dump excerpt that you posted
> > above.  SRA saw a structure that is not addressable and with only
> > local uses and decided to scalarize it, the pointer is now in SR.13_3
> > and all accesses to __pfn should be replaced with that.  The
> > comparison is converted.
> Is the fact that _pfn was a pointer to a function retained in SR.13_3?  

Yes, the dump says:

  bool SV::<T4394> (const struct SV *, const struct SV &) * SR.13;

which looks exactly like the type in the structure.

> > If the *type* of D.43111 is somehow special in a way that is
> > undetectable to a tree pass, it (again, the type) should have
> > TREE_ADDRESSABLE set.
> I don't think the type of D.43111 is special other than it contains a 
> field that is a function pointer.
> 

Then I believe SRA is not the culprit, you probably need to trace what
happens to SR.13 afterwards and whether it is correctly expanded to
RTL.

Reply via email to