------- Comment #21 from rguenth at gcc dot gnu dot org 2010-05-25 14:57
-------
We're exchanging
movq 112(%rsp), %rdx
and
leaq 96(%rsp), %rbx
movq %rbp, 16(%rbx)
which is broken.
(insn 565 18 20 3 /usr/include/boost/function/function_template.hpp:566 (set
(reg/f:DI 3 bx [242])
(plus:DI (reg/f:DI 7 sp)
(const_int 96 [0x60]))) 248 {*lea_1} (nil))
(insn 23 21 24 3 gtest.cc:21 (set (mem/s/f:DI (plus:DI (reg/f:DI 3 bx [242])
(const_int 16 [0x10])) [20 D.60304_20->l_.D.57654.a1_.t_+0 S8
A64])
(reg/f:DI 6 bp [140])) 89 {*movdi_1_rex64} (expr_list:REG_DEAD
(reg/f:DI 6 bp [140])
(nil)))
(insn 39 38 40 3 /usr/include/boost/function/function_template.hpp:886 (set
(reg:DI 1 dx [orig:146 f.D.56107.D.55977.functor+8 ] [146])
(mem/s/c:DI (plus:DI (reg/f:DI 7 sp)
(const_int 112 [0x70])) [9 f.D.56107.D.55977.functor+8 S8
A64])) 89 {*movdi_1_rex64} (expr_list:REG_EQUIV (mem/s/c:DI (plus:DI (reg/f:DI
7 sp)
(const_int 112 [0x70])) [9 f.D.56107.D.55977.functor+8 S8 A64])
(nil)))
Relevant MEM_ATTRs are
[20 D.60304_20->l_.D.57654.a1_.t_+0 S8 A64]
[9 f.D.56107.D.55977.functor+8 S8 A64]
struct bind_t * D.60304;
struct bind_t f;
struct func_t f;
D.60304_20 = (struct bind_t *) &f.D.56107.D.55977.functor.data;
D.60304_20->l_.D.57654.a1_.t_ = &id;
...
g.D.56107.D.55977.functor = f.D.56107.D.55977.functor;
which we disambiguate via the TBAA tree oracle as the pointed-to type
by D.60304_20 is bind_t and has alias-set 21 which is not a subset of
alias-set 5, the alias-set of f. This particular disambiguation would
be fixed by backporting the alias_set_subset_of change. Then we
disambiguate via access-path based disambiguation.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44164