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 optimization/12815] [3.3/3.4 Regression] Code compiled with optimization behaves unexpectedly


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) ;
    }
}


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