diff options
author | Mark Mitchell <mark@codesourcery.com> | 2000-10-28 21:37:21 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2000-10-28 21:37:21 +0000 |
commit | 930cd7963b4a8e30901950a1103c7a84257ee8db (patch) | |
tree | f9b766c10d56911ec3d339018173bc602fa170fb /gcc/testsuite | |
parent | cea1f697a4487ba7b801c7bdb3f15379953fa34e (diff) | |
download | gcc-930cd7963b4a8e30901950a1103c7a84257ee8db.zip gcc-930cd7963b4a8e30901950a1103c7a84257ee8db.tar.gz gcc-930cd7963b4a8e30901950a1103c7a84257ee8db.tar.bz2 |
pt.c (instantiate_decl): Always instantiate static data members initialized in-class.
* pt.c (instantiate_decl): Always instantiate static data members
initialized in-class.
From-SVN: r37107
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/instan1.C | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/instan1.C b/gcc/testsuite/g++.old-deja/g++.other/instan1.C new file mode 100644 index 0000000..87c966d --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/instan1.C @@ -0,0 +1,24 @@ +// Build don't run: +// Origin: Mark Mitchell <mark@codesourcery.com> +// Special g++ Options: -fno-implicit-templates + +template <class T> +struct U { + static int j; +}; + +template <class T> +struct S { + static const int i = 7; +}; + +template <class T> +const int S<T>::i; + +template <class T> +int U<T>::j = S<T>::i + 5; + +template int U<double>::j; + +int main () { +} |