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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// PR debug/48967
2
// { dg-do compile }
3
// { dg-options "-g -O2" }
4
 
5
template  struct A;
6
template  struct A 
7
{
8
  typedef T ref;
9
};
10
template  struct B
11
{
12
  typedef A  t;
13
  typedef typename t::ref ref;
14
  ref operator * () { return ref (); }
15
};
16
template  struct I
17
{
18
  typedef T *cp;
19
  template  struct J
20
  {
21
    typedef I  other;
22
  };
23
};
24
template  struct S : public I 
25
{
26
};
27
template  struct E
28
{
29
  typedef typename _A::template J ::other at;
30
};
31
template  > struct D
32
{
33
  typedef E  _Base;
34
  typedef typename _Base::at at;
35
  typedef typename at::cp cp;
36
  typedef B  H;
37
};
38
template  struct F
39
{
40
  T *operator -> () { return __null; }
41
};
42
template  long
43
lfloor (T x)
44
{
45
  return static_cast (x) - (x && x != static_cast (x));
46
}
47
template  long
48
lround (T x)
49
{
50
  return lfloor (x - 0.5) + 1;
51
}
52
class M;
53
template  class P;
54
typedef P  Q;
55
template  struct P
56
{
57
  float x ();
58
};
59
struct CV
60
{
61
  Q c;
62
};
63
struct C
64
{
65
  void foo (const CV &) const;
66
  class O;
67
  typedef D  > R;
68
  R n;
69
};
70
struct S3
71
{
72
  S3 (int, int);
73
};
74
struct S2
75
{
76
  S3 sx, sy;
77
  S2 (int x = 0, int y = 0, int s = 0, int t = 0) : sx (x, y), sy (s, t) {}
78
};
79
template  struct N
80
{
81
  int bar ();
82
};
83
struct C::O
84
{
85
  N  o;
86
  void foo (CV r, int)
87
  {
88
    Q c = r.c;
89
    float t = 0.5 * (o.bar ());
90
    S2 (lround (c.x ()), t);
91
  }
92
};
93
void
94
C::foo (const CV &w) const
95
{
96
  R::H m;
97
  (*m)->foo (w, 8);
98
}

powered by: WebSVN 2.1.0

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