This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13028] ia64 gcc with -O2 does not store value in register into local varible
- From: "dhazeghi at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Dec 2003 23:11:00 -0000
- Subject: [Bug c/13028] ia64 gcc with -O2 does not store value in register into local varible
- References: <20031112215357.13028.czang@panasas.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dhazeghi at yahoo dot com 2003-12-09 23:10 -------
As pointed out, you're violating strict aliasing rules. With gcc 3.3:
bash-2.05a$ gcc -Wall -O3 bug.c
bug.c: In function `call':
bug.c:17: warning: dereferencing type-punned pointer will break strict-aliasing rules
If you want this to work, you'll have to compile with -fno-strict-aliasing, in which case it does
work, at least with 3.3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13028