ipa-cp: Perform operations in the appropriate types (PR 118097)
[gcc.git] / gcc / testsuite / g++.dg / template / access36.C
blob72ca23c7017b1b76aa3f98cc0dc947513d2db83e
1 // PR c++/16617
3 class B
5   protected:
6   int i;
7 };
9 template <class T> void fr ();
11 class D2 : public B
13   friend void fr<int> ();
16 template<int B::*> struct X
17 {};
19 template <class T> void fr ()
21   X<&B::i> x1;  // { dg-error "protected" }
22   X<&D2::i> x2; // { dg-error "protected" }
25 template void fr<char>();