------- Comment #2 from jakub at gcc dot gnu dot org 2008-02-09 10:30 ------- Why do the structs need to be the same? They have TYPE_STRUCTURAL_EQUALITY_P set and useless_type_conversion_p is true for these two types. And that's the tree-ssa check for type compatibility. It is very likely --combine can create similar IL, so SRA needs to be able to deal with it. I believe we could in cp_genericize_r replace all TYPE_PTRMEMFUNC_P types with a single canonical RECORD_TYPE representing pointer to member, I don't think the middle-end should care about the differences, but that would be only a workaround for the tree-sra inability to handle structuraly equal but not identical aggregates.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35144