This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25768] [3.4 regression] wrong code with inlining at -O2
- 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: 13 Jan 2006 03:34:49 -0000
- Subject: [Bug c++/25768] [3.4 regression] wrong code with inlining at -O2
- References: <bug-25768-5268@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pinskia at gcc dot gnu dot org 2006-01-13 03:34 -------
You are violating C++ aliasing rules, you have:
int new_ybar_inline
p = reinterpret_cast<void *>( free_list );
free_list = free_list->next;
......
return p;
*newchild = new_ybar_inline();
(*newchild)->kind = interior;
so you are accessing the same memory location via two types.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25768