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 rtl-optimization/33450] Optimization with -O3 and -O2 producing bad code



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


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