From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5170 invoked by alias); 24 Sep 2013 14:20:01 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 5108 invoked by uid 89); 24 Sep 2013 14:20:01 -0000 Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 24 Sep 2013 14:20:01 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id D878E2666324; Tue, 24 Sep 2013 16:19:57 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id enaXT1vgL3TC; Tue, 24 Sep 2013 16:19:57 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 71C542666321; Tue, 24 Sep 2013 16:19:57 +0200 (CEST) From: Eric Botcazou To: Richard Biener Cc: gcc-patches@gcc.gnu.org, Bernd Edlinger , Martin Jambor Subject: Re: [PATCH, PR 57748] Check for out of bounds access, Part 2 Date: Tue, 24 Sep 2013 14:46:00 -0000 Message-ID: <1465490.zsY1Q0N3SZ@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.29-desktop; KDE/4.7.2; x86_64; ; ) In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2013-09/txt/msg01783.txt.bz2 > Index: gcc/expr.c > =================================================================== > --- gcc/expr.c (revision 202778) > +++ gcc/expr.c (working copy) > @@ -9878,7 +9878,7 @@ > && modifier != EXPAND_STACK_PARM > ? target : NULL_RTX), > VOIDmode, > - modifier == EXPAND_SUM ? EXPAND_NORMAL : modifier); > + EXPAND_MEMORY); > > /* If the bitfield is volatile, we want to access it in the > field's mode, not the computed mode. > > context suggests that we may arrive with EXPAND_STACK_PARM here > which is a correctness modifier (see its docs). But I'm not too familiar > with the details of the various expand modifiers, Eric may be though. Yes, this change looks far too bold and is presumably papering over the underlying issue... > That said, I still believe that fixing the misalign path in > expand_assignment would be better than trying to avoid it. For this > testcase the issue is again that expand_assignment passes the wrong > mode/target to the > movmisalign optab. ...then let's just fix the movmisalign stuff. -- Eric Botcazou