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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [using17.C] - Blame information for rev 696

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/14258
2
// { dg-do run }
3
 
4
template
5
struct A
6
{
7
  typedef T type;
8
  typedef A type2;
9
};
10
 
11
template
12
struct B : A
13
{
14
  using typename A::type;
15
  type t;
16
 
17
  using typename A::type2;
18
 
19
  type f()
20
  {
21
    type i = 1;
22
    return i;
23
  }
24
};
25
 
26
int main()
27
{
28
  B::type t = 4;
29
  if (t != 4)
30
    __builtin_abort();
31
 
32
  B b;
33
  b.t = 3;
34
  if (b.t != 3)
35
    __builtin_abort();
36
 
37
  B b2;
38
  if (b2.f() != 1)
39
    __builtin_abort();
40
 
41
  B::type2::type tt = 12;
42
  if (tt != 12)
43
    __builtin_abort();
44
}

powered by: WebSVN 2.1.0

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