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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/50793
2
// { dg-do run }
3
 
4
struct NonTrivial
5
{
6
  NonTrivial() { }
7
};
8
 
9
struct S
10
{
11
  NonTrivial nt;
12
  int i;
13
};
14
 
15
int f(S s)
16
{
17
  s.i = 0xdeadbeef;
18
  return s.i;
19
}
20
 
21
int g(S s = S())
22
{
23
  return s.i;
24
}
25
 
26
int main()
27
{
28
  f(S());  // make stack dirty
29
 
30
  if ( g() )
31
    __builtin_abort();
32
}

powered by: WebSVN 2.1.0

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