This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30208] program was compiled wrong when use GCC O2 or O3 option
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Dec 2006 04:53:36 -0000
- Subject: [Bug c/30208] program was compiled wrong when use GCC O2 or O3 option
- References: <bug-30208-13753@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-12-14 04:53 -------
You are violating C aliasing rules.
C aliasing rules say you can only access a variable (or an array) by the
orginal type (signed or unsigned version) or a character type (or qualified
types of those).
You have an access to a variable via both a short and an int which
automatically violates C aliasing rules.
*** This bug has been marked as a duplicate of 21920 ***
*** This bug has been marked as a duplicate of 21920 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30208