]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Mon, 13 Jun 2005 17:20:28 +0000 (17:20 +0000)
committerNo Author <no-author@gcc.gnu.org>
Mon, 13 Jun 2005 17:20:28 +0000 (17:20 +0000)
'gcc-3_4-branch'.

From-SVN: r100882

gcc/testsuite/g++.dg/init/member1.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/init/member1.C b/gcc/testsuite/g++.dg/init/member1.C
new file mode 100644 (file)
index 0000000..1c89d5a
--- /dev/null
@@ -0,0 +1,18 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 13 Jun 2005 <nathan@codesourcery.com>
+
+// Origin:   Ivan Godard <igodard@pacbell.net>
+// Bug 20789: ICE on invalid
+
+template<typename> struct A;
+
+template<int> struct B {};
+
+template<typename T> struct C
+{
+  static const int i = A<T>::i;  // { dg-error "incomplete" }
+  static const int j = i;      // { dg-error "initialized by a non-const" }
+  B<j> b;  // { dg-error "not a valid template arg" }
+};
+
+C<int> c;