re PR c++/27961 (ICE on invalid template declaration)
authorLee Millward <lee.millward@codesourcery.com>
Thu, 12 Oct 2006 20:02:53 +0000 (20:02 +0000)
committerLee Millward <lmillward@gcc.gnu.org>
Thu, 12 Oct 2006 20:02:53 +0000 (20:02 +0000)
commit650fcd0729e2fcf4df28a46a6de4bc748724e2b1
tree9d618cd33c15c8d8e4b84231544bd954f4ad8229
parentdc0aeb60698a2ec7ece635ea3378ba4961694976
re PR c++/27961 (ICE on invalid template declaration)

       PR c++/27961
       * decl.c (start_decl): Return error_mark_node if a
       function is initialized like a variable.
       (check_var_type): If a variable of field is declared void,
       set the type to error_mark_node.
       (grokdeclarator): Check the return type of check_var_type.
       * class.c (finish_struct_1): Robustify.

       * g++.dg/template/crash60.C: New test.
       * g++.dg/other/large-size-array.C: Adjust error markers.
       * g++.dg/parse/crash27.C: Likewise.
       * g++.dg/template/crash1.C: Likewise.

From-SVN: r117671
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/large-size-array.C
gcc/testsuite/g++.dg/parse/crash27.C
gcc/testsuite/g++.dg/template/crash1.C