This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/33450] Optimization with -O3 and -O2 producing bad code
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Sep 2007 06:46:18 -0000
- Subject: [Bug rtl-optimization/33450] Optimization with -O3 and -O2 producing bad code
- References: <bug-33450-15102@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from ebotcazou at gcc dot gnu dot org 2007-09-17 06:46 -------
> It doesn't appear in x86 Mac Os X 10.4 with "version 4.0.1 (Apple Computer,
> Inc. build 5250)"
Because the GCC released by Apple defaults to -fno-strict-aliasing.
> Gcc "forget" code's dependancy.
No, your code violates the aliasing rules of the ISO C standard and GCC is
allowed to optimize it. Either fix your code or use -fno-strict-aliasing.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33450