This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/37573] [4.4 Regression] gcc-4.4 regression: incorrect code generation with -O1 -ftree-vectorize
- From: "sebpop at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Oct 2008 16:10:28 -0000
- Subject: [Bug tree-optimization/37573] [4.4 Regression] gcc-4.4 regression: incorrect code generation with -O1 -ftree-vectorize
- References: <bug-37573-15165@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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