https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113617
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The difference with that revision is --- pr113617-aux.s1 2024-01-26 11:00:05.532246309 -0500 +++ pr113617-aux.s 2024-01-26 11:00:36.291552459 -0500 @@ -80,22 +80,21 @@ _ZN3vtk6detail3smp15vtkSMPToolsImplILi1E pushq %r12 .LCFI3: movq %rdx, %r12 - leaq _ZN4blah17_Function_handlerIFvvENS_5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEEE10_M_managerERNS_9_Any_dataERKSI_NS_18_Manager_operationE(%rip), %rdx pushq %rbp .LCFI4: - movq %rdx, %xmm0 movq %r8, %rbp pushq %rbx .LCFI5: - punpcklqdq %xmm1, %xmm0 movq %rcx, %rbx subq $40, %rsp .LCFI6: movq For_threadNumber@GOTPCREL(%rip), %rax + movq .LC0(%rip), %xmm0 leaq 31(%rsp), %r13 - movaps %xmm0, (%rsp) movl (%rax), %esi + punpcklqdq %xmm1, %xmm0 movq %r13, %rdi + movaps %xmm0, (%rsp) call _ZN3vtk6detail3smp16vtkSMPThreadPoolC1Ei@PLT movq (%rsp), %r14 .p2align 4,,10 @@ -218,6 +217,10 @@ _Z34vtkPolyDataPlaneClipperRequestDatav: .size _Z34vtkPolyDataPlaneClipperRequestDatav, .-_Z34vtkPolyDataPlaneClipperRequestDatav .local _ZN12_GLOBAL__N_117GenerateCap_linesE .comm _ZN12_GLOBAL__N_117GenerateCap_linesE,1,1 + .section .data.rel.ro.local,"aw" + .align 8 +.LC0: + .quad _ZN4blah17_Function_handlerIFvvENS_5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEEE10_M_managerERNS_9_Any_dataERKSI_NS_18_Manager_operationE .section .eh_frame,"aw",@progbits .Lframe1: .long .LECIE1-.LSCIE1 (pretty much the same as in the other assembler file). I must say I'm completely lost in where symbols defined in comdat sections may be referenced and where not, can one reference them in code sections and not data sections, or only comdat code sections or what? I thought it is pretty much a normal thing to reference comdat functions in both code and data/rodata sections, how else could one do say: __attribute__((noinline, noipa)) inline void foo () {} void bar () { foo (); } void (*p) () = foo; void (*const q) () = foo; void (*const *r) () = &q;