This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/13028] ia64 gcc with -O2 does not store value in register into local varible


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]