From 881082e9e3a959338837b2e7b6ef618d6a562f67 Mon Sep 17 00:00:00 2001 From: paolo Date: Sat, 7 Feb 2009 02:05:04 +0000 Subject: /cp 2009-02-06 Paolo Carlini PR c++/35147 PR c++/37737 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Check TREE_VEC_LENGTH. /testsuite 2009-02-06 Paolo Carlini PR c++/35147 PR c++/37737 * g++.dg/cpp0x/vt-35147.C: New. * g++.dg/cpp0x/vt-37737-1.C: Likewise. * g++.dg/cpp0x/vt-37737-2.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144001 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/cp-tree.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/cp/cp-tree.h') diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 186ec9ab6ad..f37c8883688 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -2270,8 +2270,8 @@ extern void decl_shadowed_for_var_insert (tree, tree); /* Nonzero if the template arguments is actually a vector of vectors, rather than just a vector. */ -#define TMPL_ARGS_HAVE_MULTIPLE_LEVELS(NODE) \ - (NODE && TREE_VEC_ELT (NODE, 0) \ +#define TMPL_ARGS_HAVE_MULTIPLE_LEVELS(NODE) \ + (NODE && TREE_VEC_LENGTH (NODE) && TREE_VEC_ELT (NODE, 0) \ && TREE_CODE (TREE_VEC_ELT (NODE, 0)) == TREE_VEC) /* The depth of a template argument vector. When called directly by -- cgit v1.2.1