> > * gimple-fold.c (can_refer_decl_in_current_unit_p): Check > > references to comdat-local symbols.
Also i think this change needs more work. FROM_DECL is not the function you are going to get the refernece, it is variable whose constructor the value was take from. I think we need to rename it to can_refer_decl_in_symbol and add symbol argument to get proper check. I am not sure where we use it without being sure the symbol is current_function_decl. We definitly make use of it during devirt and we need to start using it in ipa-cp. Honza