> Hi all, > > This is a new version of previous patch > (https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00020.html), fixed > after Rainer's remarks. Hi, the patch looks OK, but I wonder why you included can_be_discarded check? If function is in comdat I believe the optimization still can happen. Perhaps you only want to check DECL_EXTERNAL?
Honza > > -Y