------- Comment #20 from rguenth at gcc dot gnu dot org  2010-05-25 13:56 
-------
-fsched2-use-superblocks also fixes it.

-fdbg-cnt=sched_region:65 is broken, -fdbg-cnt=sched_region:64 works for
a simplified testcase tail:

int bmi_get(const int* id)
{
  if (*id != 42)
    __builtin_abort();

  return 0;
}

int main()
{
  int id = 42;

  typedef boost::function<int ()> func_t;

  func_t f = boost::bind(&bmi_get, &id);
  func_t g = f;
  g();

  return 0;
}

Assembler difference:

--- /tmp/gtest.s.ok     2010-05-25 15:51:19.000000000 +0200
+++ /tmp/gtest.s.broken 2010-05-25 15:51:30.000000000 +0200
@@ -825,21 +825,21 @@
        call    _ZN5boost6detail8function16has_empty_targetEz
        testb   %al, %al
        jne     .L93
+       movq    112(%rsp), %rdx
        leaq    96(%rsp), %rbx
-       movq    $_Z7bmi_getPKi, 104(%rsp)
-       movq    %rbp, 16(%rbx)
        movl   
$_ZZN5boost9function0IiE9assign_toINS_3_bi6bind_tIiPFiPKiENS3_5l
ist1INS3_5valueIPiEEEEEEEEvT_E13stored_vtable, %eax
        orq     $1, %rax
-       movq    %rax, 96(%rsp)
-       movq    %rax, 64(%rsp)
+       movq    $_Z7bmi_getPKi, 104(%rsp)
        movq    $_Z7bmi_getPKi, 72(%rsp)
-       movq    112(%rsp), %rdx
+       movq    %rbp, 16(%rbx)
+       leaq    64(%rsp), %rbp
+       movq    %rax, 96(%rsp)
        movq    %rdx, 80(%rsp)
        movq    120(%rsp), %rdx
-       movq    %rdx, 88(%rsp)
+       movq    %rax, 64(%rsp)
        andq    $-2, %rax
-       leaq    64(%rsp), %rbp
        leaq    8(%rbp), %rdi
+       movq    %rdx, 88(%rsp)
 .LEHB15:
        call    *8(%rax)
 .LEHE15:

Still can't see where that is broken ... :/


-- 


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

Reply via email to