aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/typedef1.C
blob: f712fc25aa5720151ed6d1e00e8dbc35e2edbb02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// PR c++/33516
// { dg-do compile }

struct S1;
typedef S1 T1;
struct S1 {
  typedef int U;
  T1::U i;
};
struct S2;
typedef S2 T2;
struct S2 {
  typedef int U;
};
T2::U j;
struct S3;
typedef S3 T3;
struct S3 {
  typedef int U;
  S3::U i;
};

void
foo ()
{
  S1 s1;
  S2 s2;
  S3 s3;
  s1.i = 6;
  j = 7;
  s3.i = 8;
}