This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/37216] [cygming] Invalid alignment for SSE store to .comm data generated with -O3
- From: "brian at dessent dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Sep 2008 20:06:47 -0000
- Subject: [Bug target/37216] [cygming] Invalid alignment for SSE store to .comm data generated with -O3
- References: <bug-37216-16627@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #21 from brian at dessent dot net 2008-09-29 20:06 -------
Subject: Re: [cygming] Invalid alignment for SSE store to
.comm data generated with -O3
This is an example of what I'm talking about: the bar() function is
optimized away to simply "return 0" because the compiler assumes the
alignment is correct without having to actually emit the code to check
it:
$ echo 'char foo[1] __attribute__((aligned(16))); int bar() {
if((int)foo % 16) return 1; else return 0; }' | i686-pc-mingw32-gcc -x c
- -S -o - -fomit-frame-pointer
.file ""
.text
.globl _bar
.def _bar; .scl 2; .type 32; .endef
_bar:
movl $0, %eax
ret
.comm _foo, 16 # 1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216