OSDN Git Service

* treelang/compile/var_defs.tree: Adjust.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.oliva / template4.C
1 // { dg-do assemble  }
2
3 // Copyright (C) 1999 Free Software Foundation
4
5 // by Alexandre Oliva <oliva@dcc.unicamp.br>
6 // based on bug report by Andrey Slepuhin <pooh@msu.ru>
7
8 template <const int&> struct X {};
9
10 int a = 1;
11 X<a> x; // ok, a has external linkage
12
13 const int b = 2;
14 X<b> y; // { dg-error "" } const b has internal linkage
15
16 extern const int c;
17 X<c> z; // ok, c has external linkage
18
19 extern const int c = 3;
20 X<c> z_; // { dg-bogus "" } using c as constant