http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55076
--- Comment #7 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-10-26 16:48:46 UTC --- What about the following naïve patch? At least it fixes the problem and causes no new test suite regressions. diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 8d555c2..0f1a75d 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -145,7 +145,7 @@ lvalue_kind (const_tree ref) case ARRAY_REF: case PARM_DECL: case RESULT_DECL: - if (TREE_CODE (TREE_TYPE (ref)) != METHOD_TYPE) + if (TREE_TYPE (ref) && TREE_CODE (TREE_TYPE (ref)) != METHOD_TYPE) return clk_ordinary; break;