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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [init/] [static3.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do run }
2
 
3
struct T
4
{
5
  static void (*handler)();
6
  static void func() {};
7
};
8
 
9
bool fail;
10
 
11
struct S {
12
  S() {
13
    if (T::handler != T::func)
14
      fail = true;
15
  }
16
};
17
 
18
static S s;
19
 
20
void (*T::handler)() = func;
21
 
22
int main()
23
{
24
  if (fail)
25
    return 1;
26
}

powered by: WebSVN 2.1.0

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