summaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2016-11-21 04:41:21 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2016-11-21 04:41:21 +0000
commit66f8c851c9c4c25f995f4784e63ce2298f39329d (patch)
treef96f5d7c6ddd277da432d34ddf9527d6e7ee5fbd /gcc/cp/tree.c
parent2bcb0e6d0cd1a9fd57e81ba1c44c717b748198f3 (diff)
downloadgcc-66f8c851c9c4c25f995f4784e63ce2298f39329d.tar.gz
PR objc++/78418 - ICE in string tests on darwin
* tree.c (lvalue_kind): Guard DECL_HAS_VALUE_EXPR_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@242647 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index d1dd7c40680..9ded9f216d9 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -142,7 +142,7 @@ lvalue_kind (const_tree ref)
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)