* semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
* g++.dg/cpp0x/decltype15.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142973
138bc75d-0d04-0410-961f-
82ee72b054a4
+2008-12-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/38640
+ * semantics.c (finish_decltype_type): Handle TEMPLATE_PARM_INDEX.
+
2008-12-29 Jakub Jelinek <jakub@redhat.com>
PR c++/38635
case CONST_DECL:
case PARM_DECL:
case RESULT_DECL:
+ case TEMPLATE_PARM_INDEX:
type = TREE_TYPE (expr);
break;
2008-12-31 Jakub Jelinek <jakub@redhat.com>
+ PR c++/38640
+ * g++.dg/cpp0x/decltype15.C: New test.
+
PR middle-end/38676
* gcc.dg/gomp/pr38676.c: New test.
--- /dev/null
+// PR c++/38640
+// { dg-do compile }
+// { dg-options "-std=c++0x" }
+
+template<int N> void foo (decltype (N));
+template<long int N> void foo (decltype (N));
+
+void
+bar (void)
+{
+ foo<5> (6);
+ foo<5L> (6L);
+}