This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/32856] Invalid optimization in the face of aliasing
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Jul 2007 14:17:28 -0000
- Subject: [Bug middle-end/32856] Invalid optimization in the face of aliasing
- References: <bug-32856-3511@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from falk at debian dot org 2007-07-23 14:17 -------
(In reply to comment #6)
> This program demonstrates the problem, it creates different output depending on
> if compiled with or without optimisation.
This does not demonstrate the problem, since your code has undefined behavior
(already c = ... is undefined). You really need something like the union
mentioned earlier.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32856