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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [lookup/] [template3.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Origin PR c++/47957
2
// { dg-do compile }
3
 
4
struct S
5
{
6
  int m;
7
 
8
  S()
9
    : m(0)
10
  {
11
  }
12
};
13
 
14
struct Base
15
{
16
  typedef S T;
17
};
18
 
19
template
20
struct Derived : public Base
21
{
22
  int
23
  foo()
24
  {
25
    T a; // This is Base::T, not the template parameter.
26
    return a.m;
27
  }
28
};
29
 
30
int
31
main()
32
{
33
  Derived d;
34
  return d.foo();
35
}

powered by: WebSVN 2.1.0

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