> On 06/17/2013 06:05 AM, Jan Hubicka wrote: > >It is my understanding that C++ standard enforces one definition rule for > >types, too (to enable sane mangling?) and that we can basically match types > >by their name and contextes (namespaces/outer classes)? > > Yes. Also for template instantiations and inline functions > (basically, decls with TREE_COMDAT set). That isn't very
Can't those be just merged based on assembler name? > interesting for devirt, but we might want to handle it in > decls_same_for_odr anyway. > > Also, it would be really nice to warn about ODR violations: > types/decls that are the same for ODR but are structurally > different. I think this is something Richard can handle (semi-easilly) with his new tree merging patch. > > >+ This is non-trivial for LTO where minnor differences in > > "minor" > > >+ /* If types are not structuraly same, do not bother to contnue. > > "structurally" "continue" Shall I understand this as approval with those fixes and testing? (I already tested the patch on GCC bootstrap/regtest where it seem to work, but I can do at least some testing on LTO firefox / SPEC2k6) Thanks, Honza > > Jason