1 // { dg-do compile }
2 
3 // Copyright (C) 2001 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 15 Dec 2001 <nathan@codesourcery.com>
5 
6 // PR 2645
7 
8 struct AS
9 {
10   typedef void (myT) ();
11   struct L {};
12 
13 };
14 
15 
16 template <typename T> struct B1 : T
17 {
18   typedef typename T::L __restrict__ r;// { dg-error "`__restrict' qualifiers cannot" "" }
19   typedef typename T::myT __restrict__ p;// { dg-warning "ignoring `__restrict'" "" { xfail *-*-* } }
20 
21   // The following are DR 295 dependent
22   typedef typename T::myT volatile *myvolatile;
23   typename T::myT volatile *a;
24   myvolatile b;
25 };
26 template <typename T> struct B2 : T
27 {
28   // The following are DR 295 dependent
29   typedef typename T::myT const *myconst;
30   typename T::myT const *a;
31   myconst b;
32 };
33 
34 B1<AS> b1;	// { dg-error "instantiated" "" }
35 B2<AS> b2;
36