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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [t39.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do run  }
2
extern "C" int printf (const char *, ...);
3
 
4
template 
5
struct frob {
6
  T *ptr;
7
  void print ();
8
  frob (T* init) { ptr = init; }
9
};
10
 
11
template 
12
void frob::print () {
13
  printf ("this = %08x\n", this);
14
  printf (" ptr = %08x\n", ptr);
15
  printf (" values = %x %x %x ...\n", ptr[0], ptr[1], ptr[2]);
16
}
17
 
18
  static int x[10];
19
  frob fc ("hello");
20
  frob fi (x);
21
 
22
int main () {
23
  fc.print ();
24
  fi.print ();
25
  return 0;
26
}

powered by: WebSVN 2.1.0

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