From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18424 invoked by alias); 22 Oct 2008 16:11:49 -0000 Received: (qmail 17245 invoked by alias); 22 Oct 2008 16:10:28 -0000 Date: Wed, 22 Oct 2008 16:11:00 -0000 Message-ID: <20081022161028.17244.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/37573] [4.4 Regression] gcc-4.4 regression: incorrect code generation with -O1 -ftree-vectorize In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "sebpop 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: 2008-10/txt/msg01457.txt.bz2 ------- Comment #12 from sebpop at gmail dot com 2008-10-22 16:10 ------- Subject: Re: [4.4 Regression] gcc-4.4 regression: incorrect code generation with -O1 -ftree-vectorize > common base. Consider &s.c[1] and &s + i, obviously the accesses can > overlap - would you still say so if the base address of the first one > would be &s.c[0]? Yes, in the case &s.c[1] versus &s.c[0], we still have to consider the arrays to potentially overlap. > (really the base address of a non-variable access is the access > itself, right? &s.c[1] in this case) No, it cannot be &s.c[1] here. The base object for arrays in structs should be the struct itself. The base address tells you what memory object is accessed with an offset. For structs, you are allowed to access any of their contents using arithmetic. For instance in: struct s { int a[2]; int c[20]; } you could access s.c[10] from the address of struct s with: &s.a + 12. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37573