2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.oliva / template4.C
blob2268fde400e3bdafdea9fb6e8bd05da790943e03
1 // { dg-do assemble  }
3 // Copyright (C) 1999 Free Software Foundation
5 // by Alexandre Oliva <oliva@dcc.unicamp.br>
6 // based on bug report by Andrey Slepuhin <pooh@msu.ru>
8 template <const int&> struct X {};
10 int a = 1;
11 X<a> x; // ok, a has external linkage
13 const int b = 2;
14 X<b> y; // { dg-error "" } const b has internal linkage
16 extern const int c;
17 X<c> z; // ok, c has external linkage
19 extern const int c = 3;
20 X<c> z_; // { dg-bogus "" } using c as constant