]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/cp/tree.cc
c++: lvalueness of non-dependent assignment expr [PR114994]
[thirdparty/gcc.git] / gcc / cp / tree.cc
index f1a23ffe817950570d3b36f2460b9c32d64d49dd..9d37d255d8d5cb77185fe6a5fe1990c66d4c81f3 100644 (file)
@@ -275,7 +275,10 @@ lvalue_kind (const_tree ref)
       /* We expect to see unlowered MODOP_EXPRs only during
         template processing.  */
       gcc_assert (processing_template_decl);
-      return clk_ordinary;
+      if (CLASS_TYPE_P (TREE_TYPE (TREE_OPERAND (ref, 0))))
+       goto default_;
+      else
+       return clk_ordinary;
 
     case MODIFY_EXPR:
     case TYPEID_EXPR: