Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.old-deja/g++.other/conv6.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// { dg-do run } // Test for composite pointer types, as defined in [expr.rel], // and common pointer to member types, as defined in [expr.eq]. struct A { int i; }; struct B : public A { }; int main () { B b; // The composite type is `A const *' A* ap = &b; const B* bp = &b; if (ap != bp) // { dg-bogus "" } distinct types return 1; // The composite type is `B const *const *' B *const * p = 0; B const * * q = 0; if (p != q) // { dg-bogus "" } distinct types return 1; // The common type is `int const B::*' const int A::*apm = &A::i; int B::*bpm = &A::i; if (apm != bpm) // { dg-bogus "" } distinct types return 1; }