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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [abi/] [layout1.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// Red Hat bugzilla 64535
2
// Bug: We are allocationg stuff into the tail padding of POD class "A".
3
// { dg-do run }
4
 
5
struct A
6
{
7
  int x;
8
  char y;
9
};
10
 
11
struct B : public A {
12
  virtual void f () {}
13
  char z;
14
};
15
 
16
A a = { 21, 42 };
17
B b;
18
 
19
int
20
main (void)
21
{
22
  b.x = 12;
23
  b.y = 24;
24
  b.z = 36;
25
 
26
  A *ap = &b;
27
 
28
  *ap = a;
29
 
30
  return (b.z != 36);
31
}

powered by: WebSVN 2.1.0

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