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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr41186.C] - Blame information for rev 307

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

Line No. Rev Author Line
1 301 jeremybenn
/* { dg-do run } */
2
 
3
struct Foo {
4
  Foo() {};
5
  int i;
6
  short f;
7
};
8
struct Bar : public Foo {
9
  Bar() {};
10
  short b;
11
};
12
 
13
extern "C" void abort(void);
14
 
15
int main()
16
{
17
  Bar b1, b2;
18
  b2.i = 0;
19
  b1.f = 0;
20
  b1.b = 1;
21
  b2.f = 1;
22
  b2.b = 2;
23
  static_cast(b1) = static_cast(b2);
24
  if (b1.i != 0 || b1.b != 1)
25
    abort ();
26
  if (b1.f != 1)
27
    abort ();
28
  return 0;
29
}

powered by: WebSVN 2.1.0

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