https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93384

--- Comment #24 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Reading through the PR I understand it as follows

 1) we create localalias for a symbol
 2) ipa-pure-const founds that the function is noreturn.
    Here seems to be a bug, since it does
     TREE_THIS_VOLATILE (current_function_decl) = 1
    while what it should really do is to walk symbol and all its clones and if
the availability is AVAILABLE set the flag. It should also update associated
thunks. This is implemented for const/pure in set_const_flag. I will look into
this.
 3) later we introduce new refernece and want local alias again.
create_localalias no longer sees the original local alias as one (because it is
now different) and creates new one with identical assembler name

3 is a bug which is not solved by 2 and I think it is a fallout of the
reproducible clone names patch we added few releases back.  We used to be
creating .localalias.<xyz> while now we stop the ID. Where we lose the clone
ID?

I am not sure how hard would be clone ID right (i.e. if we just forget to
stream it or it happens because of symbol merging), Alternative would be to
modify
 clone_function_name_1 to lookup assembler name in the symbol table and in the
case of clash increment the clone ID. We do not produce very many clones of a
single symbol name so this could work well enough.

Reply via email to