https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103053
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- In this particular case it is cause by my r7-6851-gb607e75e25261ac2c81d71fe1a4dcf5fcd166603 where we try to emit the division as both signed and unsigned if value range shows both will work the same, and pick the cheaper one. The underlying problem is different, we call assemble_external_libcall prematurely from emit_library_call_value_1, to avoid such spurious .globl directives we'd need to somehow mark the CALL_INSN and emit those only late during RTL optimizations, either during final if those directives can be intermixed with instructions, or close before final otherwise (in some late always done pass that walks the whole IL). Because otherwise we can emit it even for library calls we just tried and chose not to emit, or for code that we even expand, but later during RTL optimizations optimize away.