From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19664 invoked by alias); 25 May 2010 14:57:39 -0000 Received: (qmail 19564 invoked by uid 48); 25 May 2010 14:57:19 -0000 Date: Tue, 25 May 2010 14:57:00 -0000 Message-ID: <20100525145719.19563.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/44164] [4.5 Regression] Aliasing bug triggered by Boost.Bind/Boost.Function In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-05/txt/msg02847.txt.bz2 ------- 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