diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2010-08-30 18:13:32 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2010-08-30 18:13:32 +0000 |
commit | b960ce040d53b610b2b2e3fb9c2220353a297229 (patch) | |
tree | 9743cff432abc372b418fcddc3b9c51c60bd55f5 /gcc/cp | |
parent | b0268cc04f2b9a39dc70388cc63d88ff5e839049 (diff) | |
download | gcc-b960ce040d53b610b2b2e3fb9c2220353a297229.zip gcc-b960ce040d53b610b2b2e3fb9c2220353a297229.tar.gz gcc-b960ce040d53b610b2b2e3fb9c2220353a297229.tar.bz2 |
re PR c++/45043 (ICE: tree check: expected identifier_node, have bit_not_expr in grokdeclarator, at cp/decl.c:8113 on invalid code)
/cp
2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/45043
* decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs.
/testsuite
2010-08-30 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/45043
* g++.dg/template/crash102.C: New.
From-SVN: r163655
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index de8575c..071f8d6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2010-08-30 Paolo Carlini <paolo.carlini@oracle.com> + + PR c++/45043 + * decl.c (grokdeclarator): Use MAIN_NAME_P only on IDENTIFIER_NODEs. + 2010-08-30 Jakub Jelinek <jakub@redhat.com> PR middle-end/45423 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 6465658..75fd9f7 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -8115,7 +8115,8 @@ grokdeclarator (const cp_declarator *declarator, common. With no options, it is allowed. With -Wreturn-type, it is a warning. It is only an error with -pedantic-errors. */ is_main = (funcdef_flag - && dname && MAIN_NAME_P (dname) + && dname && TREE_CODE (dname) == IDENTIFIER_NODE + && MAIN_NAME_P (dname) && ctype == NULL_TREE && in_namespace == NULL_TREE && current_namespace == global_namespace); |