On Mon, Jan 29, 2024 at 08:23:21AM -0800, H.J. Lu wrote: > > baz: > > movq .LC0(%rip), %xmm0 > > ret > > I don't think this is valid. We can't reference a non-public > symbol outside of a COMDAT group. It is OK to reference > foo or foo + 1, but not .LC0.
But that is exactly what your patch does, e.g. on the first testcase: --- pr113617-1a.s 2024-01-29 11:29:55.831512974 +0100 +++ pr113617-1a.s 2024-01-29 11:30:04.335394116 +0100 @@ -51,28 +-51,28 @@ .section .text._ZN3vtk6detail3smp15vtkSMPToolsImplILi1EE3ForINS1_27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEEEEvxxxRT_,"axG",@progbits,_ZN26vtkStaticCellLinksTemplateIxE18ThreadedBuildLinksExxP12vtkCellArray,comdat .align 2 .p2align 4 .type _ZN3vtk6detail3smp15vtkSMPToolsImplILi1EE3ForINS1_27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEEEEvxxxRT_, @function _ZN3vtk6detail3smp15vtkSMPToolsImplILi1EE3ForINS1_27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEEEEvxxxRT_: pushq %r15 leaq _ZN4blah17_Function_handlerIFvvENS_5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEEE9_M_invokeERKNS_9_Any_dataE(%rip), %rax leaq _ZN3vtk6detail3smp23ExecuteFunctorSTDThreadINS1_27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEEEEvPvxxx(%rip), %r15 pushq %r14 movq %rax, %xmm1 pushq %r13 pushq %r12 movq %rdx, %r12 pushq %rbp movq %r8, %rbp pushq %rbx movq %rcx, %rbx subq $40, %rsp movl For_threadNumber(%rip), %esi movq .LC0(%rip), %xmm0 leaq 31(%rsp), %r13 punpcklqdq %xmm1, %xmm0 movq %r13, %rdi movaps %xmm0, (%rsp) call _ZN3vtk6detail3smp16vtkSMPThreadPoolC1Ei@PLT movq (%rsp), %r14 .p2align 4,,10 .p2align 3 @@ -191,9 +191,9 @@ vtkConstrainedSmoothingFilterRequestData .size For_threadNumber, 4 For_threadNumber: .zero 4 - .section .data.rel.ro.local,"aw" + .section .data.rel.ro.local._ZN4blah17_Function_handlerIFvvENS_5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEEE10_M_managerERNS_9_Any_dataERKSI_NS_18_Manager_operationE,"awG",@progbits,_ZN26vtkStaticCellLinksTemplateIxE18ThreadedBuildLinksExxP12vtkCellArray,comdat .align 8 .LC0: .quad _ZN4blah17_Function_handlerIFvvENS_5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkSMPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEEE10_M_managerERNS_9_Any_dataERKSI_NS_18_Manager_operationE - .ident "GCC: (GNU) 14.0.1 20240127 (experimental)" + .ident "GCC: (GNU) 14.0.1 20240129 (experimental)" .section .note.GNU-stack,"",@progbits Jakub