From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C9BC03858C62; Fri, 26 Jan 2024 16:13:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9BC03858C62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706285625; bh=CE/tkJIM4PN4ENKAF5Nou4C/VsS4I9ZamUX+Q61ifqk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=nR5Grck7PrQtleywSm6VX1D/nrGzN0jWzPnZgykVGsPa5cpzM3o7q8XnD/EcYIuVp M9r/tgE1FsSQAcRiRL7ZDSshXWItROEfWOzLRsSi8CkquQur5Kb84mMpdElFEDZbMN yu2/cj1pmGzQRrz7kUAqoz3KURq/lWgfMBiURavs= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/113617] [14 Regression] Symbol ... referenced in section `.data.rel.ro.local' of ...: defined in discarded section ... since r14-4944 Date: Fri, 26 Jan 2024 16:13:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: link-failure, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113617 --- Comment #10 from Jakub Jelinek --- 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=20=20=20 _ZN4blah17_Function_handlerIFvvENS_5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkS= MPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEEE10_M_mana= gerERNS_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=20=20 _ZN4blah17_Function_handlerIFvvENS_5_BindIFPFvPvxxxEPN3vtk6detail3smp27vtkS= MPTools_FunctorInternalIN12_GLOBAL__N_19CountUsesIxEELb0EEExxxEEEE10_M_mana= gerERNS_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/rod= ata sections, how else could one do say: __attribute__((noinline, noipa)) inline void foo () {} void bar () { foo (); } void (*p) () =3D foo; void (*const q) () =3D foo; void (*const *r) () =3D &q;=