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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [init/] [new29.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/43951
2
// { dg-do run }
3
// { dg-options "-O2" }
4
 
5
extern "C" void abort ();
6
 
7
class Foo
8
{
9
public:
10
  Foo () : xxx (1) {};
11
  const int xxx;
12
};
13
 
14
struct Foo2
15
{
16
  Foo foo;
17
};
18
 
19
Foo2 *
20
bar ()
21
{
22
  return new Foo2;
23
}
24
 
25
int
26
main ()
27
{
28
  Foo2 *p = bar ();
29
 
30
  if (p->foo.xxx != 1)
31
    abort ();
32
  return 0;
33
}

powered by: WebSVN 2.1.0

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