> >> + if (!original->in_same_comdat_group_p (alias)) > >> + { > >> + if (dump_file) > >> + fprintf (dump_file, "Not unifying; alias cannot be created; " > >> + "across comdat group boundary\n\n"); > >> + > >> + return false; > >> + } > > > > Wasn't we supposed to do the wrapper in this case? > > > > Honza > > > > We attempt to do a wrapper, but even with wrapper we cannot introduce such > call > crossing the boundary. Proper message should be probably: > > "Not unifying; alias nor wrapper cannot be created; across comdat group > boundary"
If the symbol we are calling is one exported from comdat, it shoud work fine as long as we produce gimple thunk and it the symbol comdat exports. Of course producing call from one comdat to another may close comdat loop (which we handle elsewhere, so i assume original is comdat and alias is not) I see in the PR is the split part of comdat which is comdat local, so perhaps we want to check that original is not comdat local in addition to your current check? Honza > > Martin