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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr42760.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 middle-end/42760
2
// { dg-do compile }
3
 
4
template 
5
struct A
6
{
7
  static T b (T it) { return it; }
8
};
9
 
10
template 
11
static U
12
baz (T x, T y, U z)
13
{
14
  for (long n = y - x; n > 0; --n)
15
    {
16
      *z = *x;
17
      ++z;
18
    }
19
};
20
 
21
template 
22
U
23
bar (T x, T y, U z)
24
{
25
  baz (A ::b (x), A ::b (y), A ::b (z));
26
}
27
 
28
struct C
29
{
30
  __complex__ float v;
31
};
32
 
33
template 
34
struct B
35
{
36
  B (T y[]) { bar (y, y + 1, x); }
37
  operator T *() { return x; }
38
  T x[1];
39
};
40
 
41
B 
42
foo ()
43
{
44
  C y[1];
45
  return B  (y);
46
};

powered by: WebSVN 2.1.0

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