From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18432 invoked by alias); 21 Dec 2009 19:36:51 -0000 Received: (qmail 18412 invoked by uid 48); 21 Dec 2009 19:36:39 -0000 Date: Mon, 21 Dec 2009 19:36:00 -0000 Message-ID: <20091221193639.18411.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/42448] [4.3/4.4/4.5 Regression] Wrong code with _Complex char in structure In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ubizjak at gmail dot com" 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: 2009-12/txt/msg02036.txt.bz2 ------- Comment #2 from ubizjak at gmail dot com 2009-12-21 19:36 ------- This happens on !TARGET_BWX targets. Unaligned HImode access can cross widened SImode boundaries. Following patch triggers on this invalid condition in get_aligned_mem: Index: alpha.c =================================================================== --- alpha.c (revision 155372) +++ alpha.c (working copy) @@ -1475,6 +1475,10 @@ get_aligned_mem (rtx ref, rtx *paligned_ else offset = disp & 3; + /* The location should not cross aligned word boundary. */ + gcc_assert (offset + GET_MODE_SIZE (GET_MODE (ref)) + <= GET_MODE_SIZE (SImode)); + /* Access the entire aligned word. */ *paligned_mem = widen_memory_access (ref, SImode, -offset); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42448