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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 149 jeremybenn
extern int f (void);
2
extern int r;
3
 
4
const int *p;
5
 
6
void g ()
7
{
8
  static const int &i = f();
9
 
10
  // Test that i points to the same place in both calls.
11
  if (p && p != &i)
12
    ++r;
13
  // Test that if so, it points to static data.
14
  if (i != 42)
15
    ++r;
16
 
17
  p = &i;
18
}
19
 
20
void h ()
21
{
22
  int arr[] = { 1, 1, 1, 1, 1, 1, 1 };
23
  g ();
24
}

powered by: WebSVN 2.1.0

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