diff options
author | Alexandre Oliva <oliva@dcc.unicamp.br> | 1999-07-13 10:39:58 +0000 |
---|---|---|
committer | Alexandre Oliva <oliva@gcc.gnu.org> | 1999-07-13 10:39:58 +0000 |
commit | 4627c0f9a0375446841ed3a9e2f542c799b85cc1 (patch) | |
tree | ddfe4551d2817bcb4558f38a47b155e3f519cfb1 | |
parent | 02441cd6c686b750375d51db3b47758150cdc716 (diff) | |
download | gcc-4627c0f9a0375446841ed3a9e2f542c799b85cc1.zip gcc-4627c0f9a0375446841ed3a9e2f542c799b85cc1.tar.gz gcc-4627c0f9a0375446841ed3a9e2f542c799b85cc1.tar.bz2 |
* template4.C: New test.
From-SVN: r28085
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.oliva/template4.C | 20 |
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog b/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog index e83c32c..a9cedf5 100644 --- a/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog +++ b/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog @@ -1,5 +1,7 @@ 1999-07-13 Alexandre Oliva <oliva@dcc.unicamp.br> + * template4.C: New test. + * expr1.C: New test. * partspec1.C: New test. diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/template4.C b/gcc/testsuite/g++.old-deja/g++.oliva/template4.C new file mode 100644 index 0000000..5d7f7a6 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.oliva/template4.C @@ -0,0 +1,20 @@ +// Build don't link: + +// Copyright (C) 1999 Free Software Foundation + +// by Alexandre Oliva <oliva@dcc.unicamp.br> +// based on bug report by Andrey Slepuhin <pooh@msu.ru> + +template <const int&> struct X {}; + +int a = 1; +X<a> x; // ok, a has external linkage + +const int b = 2; +X<b> y; // ERROR - const b has internal linkage + +extern const int c; +X<c> z; // ok, c has external linkage + +extern const int c = 3; +X<c> z_; // gets bogus error - using c as constant - XFAIL *-*-* |