From 4627c0f9a0375446841ed3a9e2f542c799b85cc1 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Tue, 13 Jul 1999 10:39:58 +0000 Subject: [PATCH] * template4.C: New test. From-SVN: r28085 --- .../g++.old-deja/g++.oliva/ChangeLog | 2 ++ .../g++.old-deja/g++.oliva/template4.C | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.oliva/template4.C diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog b/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog index e83c32c1a90..a9cedf5c8d6 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 + * 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 00000000000..5d7f7a638e1 --- /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 +// based on bug report by Andrey Slepuhin + +template struct X {}; + +int a = 1; +X x; // ok, a has external linkage + +const int b = 2; +X y; // ERROR - const b has internal linkage + +extern const int c; +X z; // ok, c has external linkage + +extern const int c = 3; +X z_; // gets bogus error - using c as constant - XFAIL *-*-* -- 2.30.2