OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [conv6.C] - Blame information for rev 199

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do run  }
2
// Test for composite pointer types, as defined in [expr.rel],
3
// and common pointer to member types, as defined in [expr.eq].
4
 
5
struct A { int i; };
6
struct B : public A { };
7
 
8
int main ()
9
{
10
  B b;
11
 
12
  // The composite type is `A const *'
13
        A* ap = &b;
14
  const B* bp = &b;
15
  if (ap != bp)         // { dg-bogus "" } distinct types
16
    return 1;
17
 
18
  // The composite type is `B const *const *'
19
  B       *const * p = 0;
20
  B const *      * q = 0;
21
  if (p != q)           // { dg-bogus "" } distinct types
22
    return 1;
23
 
24
  // The common type is `int const B::*'
25
  const int A::*apm = &A::i;
26
        int B::*bpm = &A::i;
27
  if (apm != bpm)       // { dg-bogus "" } distinct types
28
    return 1;
29
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.