diff options
author | Jason Merrill <jason@redhat.com> | 2009-07-04 00:34:03 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-07-04 00:34:03 -0400 |
commit | ad909c97e2d84c7a497287eaabd498131d1ef5eb (patch) | |
tree | 8ef0778c524d062435bf88b94bc898d7b8a51acb /gcc/cp/pt.c | |
parent | caf271d8026c2f9a3ade32a8e670fa3be6e3892b (diff) | |
download | gcc-ad909c97e2d84c7a497287eaabd498131d1ef5eb.zip gcc-ad909c97e2d84c7a497287eaabd498131d1ef5eb.tar.gz gcc-ad909c97e2d84c7a497287eaabd498131d1ef5eb.tar.bz2 |
re PR c++/40619 ([c++0x] ICE on repeated decltype expression in auto functions)
PR c++/40619
* cp-tree.h (struct lang_decl_parm): New.
(struct lang_decl): Add it.
(LANG_DECL_PARM_CHECK): New.
(DECL_PARM_INDEX): New.
* decl2.c (parm_index): Remove.
* lex.c (retrofit_lang_decl): Handle parms.
(cxx_dup_lang_specific_decl): Likewise.
* mangle.c (write_expression): Adjust.
* tree.c (cp_tree_equal): Adjust.
(decl_linkage): Only check DECL_COMDAT for functions and variables.
* parser.c (cp_parser_parameter_declaration_list): Set
DECL_PARM_INDEX.
* pt.c (iterative_hash_template_arg): Hash it.
From-SVN: r149223
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r-- | gcc/cp/pt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index b93c811..527fe04 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -1488,9 +1488,7 @@ iterative_hash_template_arg (tree arg, hashval_t val) } case PARM_DECL: - /* I tried hashing parm_index as well, but in some cases we get - called too soon for that to work, so just hash the type and let - lookup check that the index matches. */ + val = iterative_hash_object (DECL_PARM_INDEX (arg), val); return iterative_hash_template_arg (TREE_TYPE (arg), val); case TARGET_EXPR: |