From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6018 invoked by alias); 9 Jul 2010 13:05:39 -0000 Received: (qmail 5941 invoked by uid 48); 9 Jul 2010 13:05:13 -0000 Date: Fri, 09 Jul 2010 13:05:00 -0000 Message-ID: <20100709130513.5940.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/44885] [4.6 regression] miscompilation of gnat.dg/aliasing3.adb after mem-ref2 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ebotcazou 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-07/txt/msg00996.txt.bz2 ------- Comment #2 from ebotcazou at gcc dot gnu dot org 2010-07-09 13:05 ------- > Can you elaborate? The relevant type for the MEM_REF is always that of the > base object, which is either a dereference (thus, of sth addressable) or > a decl (which can't be non-aliased as well, no?). In 144t.optimized there is: aliasing3_pkg__pointer.18_1->a[1]{lb: 1 sz: 4} = 5; D.2290_6 = MEM[(integer *)&aliasing3_pkg__block].a[1]{lb: 1 sz: 4}; and the type (integer *) is wrong. But you're right, it's probably wrong before since there is in 014t.veclower: aliasing3_pkg__pointer.18 = aliasing3_pkg__pointer; aliasing3_pkg__pointer.18->a[1]{lb: 1 sz: 4} = 5; aliasing3_pkg.test (&aliasing3_pkg__block.a); and in 022t.cleanup_cfg: aliasing3_pkg__pointer.18 = aliasing3_pkg__pointer; aliasing3_pkg__pointer.18->a[1]{lb: 1 sz: 4} = 5; aliasing3_pkg.test.isra (&aliasing3_pkg__block.a[1]{lb: 1 sz: 4}); So it looks like IPA-SRA breaks TYPE_NONALIASED_COMPONENT here because it takes the address of a non-aliased component. -- ebotcazou at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |tree-optimization http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44885