This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/18842] Weak optimization on global references
- 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: 5 Mar 2006 21:30:01 -0000
- Subject: [Bug tree-optimization/18842] Weak optimization on global references
- References: <bug-18842-9734@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from pinskia at gcc dot gnu dot org 2006-03-05 21:30 -------
(In reply to comment #2)
> This is not a bug. You need IPA to figure out that y is never changed. For
> example:
>
> int x, &y = x, z;
> int bar() { y = z; }
This actually does:
*y = z; and not y = &z;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18842