This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/12815] [3.3/3.4 Regression] Code compiled with optimization behaves unexpectedly
- From: "falk at debian dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Oct 2003 16:28:59 -0000
- Subject: [Bug optimization/12815] [3.3/3.4 Regression] Code compiled with optimization behaves unexpectedly
- References: <20031028154158.12815.boris@kolpackov.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12815
falk at debian dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Target Milestone|3.3.3 |---
------- Additional Comments From falk at debian dot org 2003-10-28 16:28 -------
A slightly smaller test case:
#include <typeinfo>
#include <iostream>
struct A { virtual ~A () {} };
struct APtr
{
APtr (A* p) : p_ (p) { }
A& operator* () const { return *p_; }
A* p_;
};
int main ()
{
APtr ap (new A);
std::type_info const* const exp = &typeid (*ap);
for (bool cont = true; cont; cont = false)
{
std::cout << "inner: cont " << cont << std::endl;
if (exp) ;
}
}