1 // DR 757 allows using types without linkage in declarations with linkage.
2 // Test that this doesn't lead to link-time collisions.
3 
4 // { dg-additional-sources "nolinkage1a.cc" }
5 // { dg-do link { target c++11 } }
6 
7 #include "nolinkage1.h"
8 
9 typedef struct { int i; } *AP;
10 
f(AP)11 void f(AP) { }
12 
13 A<AP> a;
14 
g()15 static void g()
16 {
17   struct B { };
18   A<B> a;
19 }
20 
main()21 int main() { g(); f(0); return 0; }
22