public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57208] Latest chromium compilation fails with enabled LTO
Date: Sat, 22 Jun 2013 21:43:00 -0000	[thread overview]
Message-ID: <bug-57208-4-XVuRiN4DWE@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-57208-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57208

--- Comment #23 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
It seems late optimizers translate

cloning Bind to
_ZN4base4BindIMN3net12_GLOBAL__N_113DnsTCPAttemptEFviENS_8internal17UnretainedWrapperIS3_EEEENS_8CallbackINS6_9BindStateINS6_13FunctorTraitsIT_E12RunnableTypeENSD_7RunTypeEFvNS6_19CallbackParamTraitsIT0_E11StorageTypeEEE14UnboundRunTypeEEESC_RKSH_.constprop.12480
Bind (struct 
{       
  void DnsTCPAttempt::<T2bc0a> (struct DnsTCPAttempt *, int) * __pfn;
  long int __delta;
} functor, const struct UnretainedWrapper & p1)
{       
  void DnsTCPAttempt::<T2bc0a> (struct DnsTCPAttempt *, int) * method$__pfn;
  long int method$__delta;

  <bb 2>:
  method$__pfn_10 = MEM[(const struct  &)&functor];
  method$__delta_11 = MEM[(const struct  &)&functor + 8];
  _5 = operator new (40);
  _12 = &MEM[(struct RefCountedThreadSafe *)_5 + 8B].D.4332;
  __base_ctor  (_12);
  MEM[(struct BindStateBase *)_5]._vptr.BindStateBase = &MEM[(void
*)&_ZTVN4base8internal13BindStateBaseE + 16B];
  MEM[(struct BindState *)_5].D.961227._vptr.BindStateBase = &MEM[(void
*)&_ZTVN4base8internal9BindStateINS0_15RunnableAdapterIMN3net12_GLOBAL__N_113DnsTCPAttemptEFviEEEFvPS5_iEFvNS0_17UnretainedWrapperIS5_EEEEE
+ 16B];
  MEM[(struct BindState *)_5 + 16B] = method$__pfn_10;
  MEM[(struct BindState *)_5 + 24B] = method$__delta_11;
  MEM[(struct BindState *)_5].p1_ = *p1_6(D);
  _13 = &_8(D)->D.42504;
  __base_ctor  (_13, _5);
  _8(D)->D.42504.polymorphic_invoke_ = Run;
  return _8(D);

}

into 
        .globl 
_ZN4base4BindIMN3net12_GLOBAL__N_113DnsTCPAttemptEFviENS_8internal17UnretainedWrapperIS3_EEEENS_8CallbackINS6_9BindStateINS6_13FunctorTraitsIT_E12RunnableTypeENSD_7RunType
        .hidden
_ZN4base4BindIMN3net12_GLOBAL__N_113DnsTCPAttemptEFviENS_8internal17UnretainedWrapperIS3_EEEENS_8CallbackINS6_9BindStateINS6_13FunctorTraitsIT_E12RunnableTypeENSD_7RunType
        .type  
_ZN4base4BindIMN3net12_GLOBAL__N_113DnsTCPAttemptEFviENS_8internal17UnretainedWrapperIS3_EEEENS_8CallbackINS6_9BindStateINS6_13FunctorTraitsIT_E12RunnableTypeENSD_7RunType
_ZN4base4BindIMN3net12_GLOBAL__N_113DnsTCPAttemptEFviENS_8internal17UnretainedWrapperIS3_EEEENS_8CallbackINS6_9BindStateINS6_13FunctorTraitsIT_E12RunnableTypeENSD_7RunTypeEFvNS6_19Callbac
.LFB10639:
        .cfi_startproc
        pushq   %rbp
        .cfi_def_cfa_offset 16
        .cfi_offset 6, -16
        movq    %rcx, %rbp
        pushq   %rbx
        .cfi_def_cfa_offset 24
        .cfi_offset 3, -24
        movq    %rdi, %rbx
        movl    $40, %edi
        subq    $8, %rsp
        .cfi_def_cfa_offset 32
        call    _Znwm@PLT
        movl    $0, 8(%rax)
        movq    %rax, %rsi
        leaq   
16+_ZTVN4base8internal9BindStateINS0_15RunnableAdapterIMN3net12_GLOBAL__N_113DnsTCPAttemptEFviEEEFvPS5_iEFvNS0_17UnretainedWrapperIS5_EEEEE.lto_priv.73096(%rip),
%rax
        movq    $0, 24(%rsi)
        movq    %rbx, %rdi
        movq    %rax, (%rsi)
        leaq    _ZN3net12_GLOBAL__N_113DnsTCPAttempt12OnIOCompleteEi(%rip),
%rax
        movq    %rax, 16(%rsi)
        movq    0(%rbp), %rax
        movq    %rax, 32(%rsi)
        call    _ZN4base8internal12CallbackBaseC2EPNS0_13BindStateBaseE
        leaq   
_ZN4base8internal7InvokerILi1ENS0_9BindStateINS0_15RunnableAdapterIMN3net12_GLOBAL__N_113DnsTCPAttemptEFviEEEFvPS6_iEFvNS0_17UnretainedWrapperIS6_EEEEESB_E3RunEPNS0_13Bind
       movq    %rax, 8(%rbx)
        addq    $8, %rsp
        .cfi_def_cfa_offset 24 
        movq    %rbx, %rax
        popq    %rbx
        .cfi_def_cfa_offset 16
        popq    %rbp
        .cfi_def_cfa_offset 8
        ret
        .cfi_endproc
.LFE10639:

So someone folds
  MEM[(struct BindStateBase *)_5]._vptr.BindStateBase = &MEM[(void
*)&_ZTVN4base8internal13BindStateBaseE + 16B];
  MEM[(struct BindState *)_5].D.961227._vptr.BindStateBase = &MEM[(void
*)&_ZTVN4base8internal9BindStateINS0_15RunnableAdapterIMN3net12_GLOBAL__N_113DnsTCPAttemptEFviEEEFvPS5_iEFvNS0_17UnretainedWrapperIS5_EEEEE
+ 16B];
  MEM[(struct BindState *)_5 + 16B] = method$__pfn_10;
  MEM[(struct BindState *)_5 + 24B] = method$__delta_11;
  MEM[(struct BindState *)_5].p1_ = *p1_6(D);

into reference to the symbol that is in other ltrans and not seen by
partitioning...


  parent reply	other threads:[~2013-06-22 21:43 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-08 12:30 [Bug c++/57208] New: Latest chromium compilation fails with enabled LTO [4.8.1/4.9.0] marxin.liska at gmail dot com
2013-05-08 12:32 ` [Bug c++/57208] " marxin.liska at gmail dot com
2013-06-03 14:50 ` [Bug c++/57208] Latest chromium compilation fails with enabled LTO marxin.liska at gmail dot com
2013-06-03 15:17 ` marxin.liska at gmail dot com
2013-06-05 12:12 ` izamyatin at gmail dot com
2013-06-05 16:26 ` marxin.liska at gmail dot com
2013-06-17 21:46 ` marxin.liska at gmail dot com
2013-06-19 17:03 ` hubicka at gcc dot gnu.org
2013-06-19 17:51 ` ian at airs dot com
2013-06-19 18:04 ` ian at airs dot com
2013-06-19 18:24 ` hubicka at gcc dot gnu.org
2013-06-19 18:27 ` jakub at gcc dot gnu.org
2013-06-19 23:14 ` hubicka at gcc dot gnu.org
2013-06-20  6:26 ` jakub at gcc dot gnu.org
2013-06-20 20:31 ` marxin.liska at gmail dot com
2013-06-21 12:55 ` hubicka at gcc dot gnu.org
2013-06-21 13:01 ` hubicka at gcc dot gnu.org
2013-06-21 13:07 ` marxin.liska at gmail dot com
2013-06-22 21:19 ` marxin.liska at gmail dot com
2013-06-22 21:43 ` hubicka at gcc dot gnu.org [this message]
2013-06-22 22:05 ` hubicka at ucw dot cz
2013-06-23 12:20 ` hubicka at ucw dot cz
2013-06-24 10:24 ` jamborm at gcc dot gnu.org
2013-06-24 16:10 ` jamborm at gcc dot gnu.org
2013-06-24 22:25 ` marxin.liska at gmail dot com
2013-06-25 11:02 ` jamborm at gcc dot gnu.org
2013-07-02 16:42 ` jamborm at gcc dot gnu.org
2013-07-02 16:43 ` jamborm at gcc dot gnu.org
2013-07-17 14:14 ` marxin.liska at gmail dot com
2022-01-01 22:58 ` pinskia 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-57208-4-XVuRiN4DWE@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).