https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87188
--- Comment #7 from dave.anglin at bell dot net --- 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> --- > gcc61.fsffrance.org unfortunately seems inaccessible, can you post > -fdump-tree-esra-details dump here together with the preceeding tree > dump file? Attached. > > 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? If not, then the transformation needs to be disabled when targetm.have_canonicalize_funcptr_for_compare() is true. Alternatively, the type of SR.13_3 could be made the same as __pfn. > > 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. Dave