This is the mail archive of the gcc-prs@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]

Re: c++/10033: [3.2 regression] optimization breaks polymorphic references w/ 'typeid' operator


Old Synopsis: optimization breaks polymorphic references w/ 'typeid' operator
New Synopsis: [3.2 regression] optimization breaks polymorphic references w/ 'typeid' operator

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Wed Mar 12 14:24:17 2003
State-Changed-Why:
    Confirmed. Here's a smaller testcase:
    ---------------------
    #include <cstdlib>
    #include <typeinfo>
    
    struct A {
        virtual ~A() { }
    };
    
    struct B : public A { };
    
    int main()
    {
        B bobj;
        A& aref = bobj;
    
        if (typeid(aref) != typeid(B))
          abort();
    
        return 0;
    }
    --------------------------------
    It executes just fine with 3.0, 3.3 and 3.4, but
    aborts with 3.2 when given -O2. So it's a regression
    of 3.2 only.
    
    W.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10033


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