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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [static5.C] - Blame information for rev 718

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/31809
2
// { dg-do run }
3
// { dg-options "-O2" }
4
 
5
struct S
6
{
7
  unsigned v;
8
  static inline S f (unsigned a);
9
};
10
 
11
inline S
12
S::f (unsigned a)
13
{
14
  static S t = { a };
15
  return t;
16
}
17
 
18
const static S s = S::f (26);
19
 
20
extern "C" void abort (void);
21
 
22
int
23
main ()
24
{
25
  S t = s;
26
  if (t.v != 26)
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.