https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119006
Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=119033 --- Comment #12 from Jan Hubicka <hubicka at gcc dot gnu.org> --- I think I should measure how often this fires. This is the usual situation where ICF merges something that is semantically equivalent in final code, but carries different metadata used later in optimization. One option is to give up on merging, other option is to modify the merged body into form safe for both cases. I hope to find time to implement infrastructure for this, and we should keep track of those issues and see how often they fires. Merging semantically equivalent functions coming from different template instantiations is important case of ICF (originally accounting for over 20% of code size of LibreOffice if I recall) Just yesterday I was filing up PR119033 which has struct foo { int a[3]; int b[3]; }; and mixes up &foo.a[3] with &foo.b[0] in PHI-opt. I suppose ICF will be happy to do same mistake...