diff --git a/gcc/cp/tree.cc b/gcc/cp/tree.cc
index fb6b2b18e94f5f290691908e4b1be3a8e606d617..79bc74fa2b7ae141a067c1f0472e3c5b27c396d1 100644
--- a/gcc/cp/tree.cc
+++ b/gcc/cp/tree.cc
@@ -213,7 +213,7 @@ lvalue_kind (const_tree ref)
 	  && DECL_IN_AGGR_P (ref))
 	return clk_none;
 
-      if (DECL_MERGEABLE (ref))
+      if (TREE_CODE (ref) == CONST_DECL || DECL_MERGEABLE (ref))
 	return clk_ordinary | clk_mergeable;
 
       /* FALLTHRU */