From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4516 invoked by alias); 25 Apr 2008 16:16:39 -0000 Received: (qmail 4071 invoked by uid 48); 25 Apr 2008 16:15:52 -0000 Date: Fri, 25 Apr 2008 16:16:00 -0000 Message-ID: <20080425161552.4070.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/36043] gcc reads 8 bytes for a struct of size 6 which leads to sigsegv In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "matz 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: 2008-04/txt/msg01829.txt.bz2 ------- Comment #8 from matz at gcc dot gnu dot org 2008-04-25 16:15 ------- FWIW, I think the error is in the caller of move_block_to_reg. move_block_to_reg can make use of a load_multiple instruction, which really loads full regs. I.e. it would be unreasonable to require changes in move_block_to_reg to handle non-power-of-2 sizes. Hence the caller (load_register_parameters) needs to handle this. I'm not sure if the n_aligned_regs thingy could be misused for this, or if one simply should opencode the special case of the last register being partial. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36043