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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [libmudflap/] [testsuite/] [libmudflap.c++/] [pass28-frag.cxx] - Blame information for rev 819

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

Line No. Rev Author Line
1 38 julius
class foo {
2
  char z [10];
3
public:
4
  virtual char *get_z () { return & this->z[0]; }
5
};
6
 
7
class bar: public foo {
8
  char q [20];
9
public:
10
  char *get_z () { return & this->q[0]; }
11
};
12
 
13
int main () {
14
foo *x = new bar ();
15
 
16
x->get_z()[9] = 'a';
17
 
18
delete x;
19
return 0;
20
}

powered by: WebSVN 2.1.0

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