This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/35653] [4.3/4.4 Regression]: gcc-4.3 -O3/-ftree-vectorize regression: incorrect code generation
- From: "edwintorok at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Mar 2008 16:59:55 -0000
- Subject: [Bug tree-optimization/35653] [4.3/4.4 Regression]: gcc-4.3 -O3/-ftree-vectorize regression: incorrect code generation
- References: <bug-35653-15165@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from edwintorok at gmail dot com 2008-03-23 16:59 -------
(In reply to comment #7)
> Subject: Re: [4.3/4.4 Regression]: gcc-4.3 -O3/-ftree-vectorize regression:
> incorrect code generation
>
> This code violates c/c++ aliasing rules.
>
-Wstrict-aliasing doesn't give a warning about it.
Accessing the memory as uint32_t is done for performance reasons, the
alternative would be to use byte-sized accesses. When reading, it would involve
additional shift/or instructions.
If the pointer is not aligned at 4 bytes, then uint32_t can't be done?
If that is the case, a warning would be *very* useful.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35653