* tree.c (lvalue_kind): Guard DECL_HAS_VALUE_EXPR_P.
From-SVN: r242647
+2016-11-18 Jason Merrill <jason@redhat.com>
+
+ PR objc++/78418 - ICE in string tests on darwin
+ * tree.c (lvalue_kind): Guard DECL_HAS_VALUE_EXPR_P.
+
2016-11-18 Jakub Jelinek <jakub@redhat.com>
PR c++/77285
return clk_none;
/* FALLTHRU */
case VAR_DECL:
- if (DECL_HAS_VALUE_EXPR_P (ref))
+ if (VAR_P (ref) && DECL_HAS_VALUE_EXPR_P (ref))
return lvalue_kind (DECL_VALUE_EXPR (CONST_CAST_TREE (ref)));
if (TREE_READONLY (ref) && ! TREE_STATIC (ref)