public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-113617-4-Z7sU7Rzgz5@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113617-4@http.gcc.gnu.org/bugzilla/>

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;

  parent reply	other threads:[~2024-01-26 16:13 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 13:08 [Bug rtl-optimization/113617] New: " jakub at gcc dot gnu.org
2024-01-26 13:08 ` [Bug rtl-optimization/113617] " jakub at gcc dot gnu.org
2024-01-26 13:09 ` jakub at gcc dot gnu.org
2024-01-26 13:09 ` jakub at gcc dot gnu.org
2024-01-26 13:10 ` jakub at gcc dot gnu.org
2024-01-26 14:22 ` hjl.tools at gmail dot com
2024-01-26 14:28 ` jakub at gcc dot gnu.org
2024-01-26 14:39 ` hjl.tools at gmail dot com
2024-01-26 15:52 ` jakub at gcc dot gnu.org
2024-01-26 15:52 ` jakub at gcc dot gnu.org
2024-01-26 15:52 ` jakub at gcc dot gnu.org
2024-01-26 15:55 ` sjames at gcc dot gnu.org
2024-01-26 16:13 ` jakub at gcc dot gnu.org [this message]
2024-01-26 20:44 ` hjl.tools at gmail dot com
2024-01-27  5:53 ` hjl.tools at gmail dot com
2024-01-27 15:13 ` hjl.tools at gmail dot com
2024-01-30 12:45 ` jakub at gcc dot gnu.org
2024-02-14  3:20 ` orion at nwra dot com
2024-02-14  8:20 ` jakub at gcc dot gnu.org
2024-02-26 17:06 ` cvs-commit at gcc dot gnu.org
2024-02-26 17:25 ` jakub at gcc dot gnu.org
2024-03-07 13:31 ` fxcoudert at gcc dot gnu.org
2024-03-07 14:03 ` jakub at gcc dot gnu.org
2024-03-07 14:07 ` fxcoudert at gcc dot gnu.org
2024-03-07 14:08 ` jakub at gcc dot gnu.org
2024-03-07 14:11 ` fxcoudert at gcc dot gnu.org
2024-03-07 14:13 ` jakub at gcc dot gnu.org
2024-03-07 14:20 ` fxcoudert at gcc dot gnu.org
2024-03-07 14:23 ` fxcoudert at gcc dot gnu.org
2024-03-08 14:19 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-113617-4-Z7sU7Rzgz5@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).