summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/init5.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/template/init5.C')
-rw-r--r--gcc/testsuite/g++.dg/template/init5.C11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/template/init5.C b/gcc/testsuite/g++.dg/template/init5.C
new file mode 100644
index 000000000..ab529beb9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/init5.C
@@ -0,0 +1,11 @@
+// Copyright (C) 2005 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 31 May 2005 <nathan@codesourcery.com>
+
+// PR 21165. ICE on valid
+// Origin:Volker Reichelt reichelt@gcc.gnu.org
+
+template<typename T> bool foo()
+{
+ const int i = T();
+ return i > 0;
+}