Here is a simple one. When processing CONST_DECLs after an error, we can ICE. This avoid the ICE.
Ok?
2013-06-11 Mike Stump <mikest...@comcast.net> * init.c (constant_value_1): Protect CONST_DECLs better in the face of errors. diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 44e558e..133a162 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1988,7 +1988,7 @@ constant_value_1 (tree decl, bool integral_p, bool return_aggregate_cst_ok_p) init = DECL_INITIAL (decl); if (init == error_mark_node) { - if (DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)) + if (VAR_P (decl) && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)) /* Treat the error as a constant to avoid cascading errors on excessively recursive template instantiation (c++/9335). */ return init;