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 c++/25895] New: [4.0/4.1/4.2 Regression] wrong code with ?: and derived class pointers


Testcase:
#include <stdlib.h>
class base {
        public:
                base() {}
        private:
                int val_;
};

class derived : public base {
        public:
                derived() {}
};

bool x = true ? (derived*)0 : (base*)0;

int main ()
{
  if (x)
    abort();
}


-- 
           Summary: [4.0/4.1/4.2 Regression] wrong code with ?: and derived
                    class pointers
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25895


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