From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18335 invoked by alias); 29 Jan 2014 16:39:09 -0000 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 Received: (qmail 18254 invoked by uid 48); 29 Jan 2014 16:39:01 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/59679] gcc version 4.7.3 and gcc version 4.5.3 cause an unaligned access exception on NetBSD/Alpha Date: Wed, 29 Jan 2014 16:39:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.7.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg03068.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D59679 --- Comment #17 from Uro=C5=A1 Bizjak --- Some more analysis: The target code expands non-bwx QImode store ;; MEM[(I8 *)_67] =3D _69; via alpha_expand_mov_nobwx, where around line 2229 (config/alpha.c) target address gets checked with "aligned_memory_operand" predicate. The pointer = is "reg/v/f:DI 115 [ arg0 ])", and its REGNO_POINTER_ALIGN is 64. This later d= atum makes aligned_memory_operand predicate to return true. The pointer alignment for reg 115 is set in mark_reg_pointer from (insn 68 67 69 (set (reg/f:DI 134) (mem/f:DI (reg/v/f:DI 115 [ arg0 ]) [2 MEM[(struct AV *)_p_36].sv_a= ny+0 S8 A64])) scope-reduced.c:53 -1 (nil)) since reg 115 is used naked to access 64bit aligned value. The above (insn 68) is defined in BB 11, where the only predecessor is BB 1= 0 (a switch), and the only successor is BB 15. Hovever (insn 101): (insn 101 100 102 (set (reg:SI 150) (mem:SI (reg/v/f:DI 115 [ arg0 ]) [0 S4 A8])) scope-reduced.c:60 -1 (nil)) which assumes 64 bit pointer alignment, lives in BB 13. Again, the only predecessor is BB 10, and the only successor is BB 15. The initialization of reg 115 is in BB 4 from a memory location: (insn 27 26 0 (set (reg/v:DI 115 [ arg0 ]) (mem:DI (plus:DI (reg/v/f:DI 76 [ p0 ]) (const_int -8 [0xfffffffffffffff8])) [27 MEM[(union ANY *)p= 0_16 + -8B]+0 S8 A64])) scope-reduced.c:37 -1 (nil)) and since everything is inside a loop, it looks to me there is no way for G= CC to assume inheritance of pointer alignments in BB 13 from BB 10. >>From gcc-bugs-return-441927-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 29 16:44:39 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 28528 invoked by alias); 29 Jan 2014 16:44:38 -0000 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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 28499 invoked by uid 48); 29 Jan 2014 16:44:34 -0000 From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/59679] gcc version 4.7.3 and gcc version 4.5.3 cause an unaligned access exception on NetBSD/Alpha Date: Wed, 29 Jan 2014 16:44:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.7.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg03069.txt.bz2 Content-length: 729 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D59679 Uro=C5=A1 Bizjak changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at redhat dot com --- Comment #18 from Uro=C5=A1 Bizjak --- (In reply to Uro=C5=A1 Bizjak from comment #17) > and since everything is inside a loop, it looks to me there is no way for > GCC to assume inheritance of pointer alignments in BB 13 from BB 10. The last line should read: GCC to assume inheritance of pointer alignments in BB 13 from BB 11. This is middle-end infrastructure problem. Adding CC. >>From gcc-bugs-return-441928-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 29 16:46:04 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 29519 invoked by alias); 29 Jan 2014 16:46:04 -0000 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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 29498 invoked by uid 48); 29 Jan 2014 16:46:01 -0000 From: "paolo.carlini at oracle dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/21609] array_allocator vs rebind & templated constructor Date: Wed, 29 Jan 2014 16:46:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.0.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: paolo.carlini at oracle dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-01/txt/msg03070.txt.bz2 Content-length: 161 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21609 --- Comment #7 from Paolo Carlini --- I agree, let's deprecate it for 4.9.