blob: 8338fef10d7b82c0101ade297cac0259dd2da2ed [file] [log] [blame]
Mark Mitchell6481daa2003-05-01 02:02:59 +00001// { dg-do run }
Jason Merrill160387c1998-07-19 20:29:35 -04002//Check whether namespace-scoped template instantiations
3//are mangled differently.
4
5namespace X{
6 template<class T>
7 struct Y{
8 int f(T){
9 return 1;
10 }
11 template<class X>void g(){}
12 };
13}
14
15template<class T>
16struct Y{
17 int f(T){
18 return 2;
19 }
20};
21
22int main()
23{
24 X::Y<int> z;
25 if (z.f(4) != 1)
26 return 1;
Mark Mitchell876200a2002-12-28 07:48:15 +000027 z.g<long>();
Jason Merrill160387c1998-07-19 20:29:35 -040028
29 Y<int> z1;
30 if (z1.f(5) != 2)
31 return 1;
32 return 0;
33}
34