--- gcc/cp/typeck.c.jj	2010-07-01 08:45:31.000000000 +0200
+++ gcc/cp/typeck.c	2010-07-02 10:54:59.000000000 +0200
@@ -7211,7 +7211,10 @@ convert_for_assignment (tree type, tree 
 
   if (TREE_CODE (type) == VECTOR_TYPE && coder == VECTOR_TYPE
       && vector_types_convertible_p (type, rhstype, true))
-    return convert (type, rhs);
+    {
+      rhs = mark_rvalue_use (rhs);
+      return convert (type, rhs);
+    }
 
   if (rhs == error_mark_node || rhstype == error_mark_node)
     return error_mark_node;
@@ -7255,7 +7258,10 @@ convert_for_assignment (tree type, tree 
 	}
 
       if (objc_compare_types (type, rhstype, parmno, rname))
-	return convert (type, rhs);
+	{
+	  rhs = mark_rvalue_use (rhs);
+	  return convert (type, rhs);
+	}
     }
 
   /* [expr.ass]
--- gcc/cp/typeck2.c.jj	2010-07-01 08:45:31.000000000 +0200
+++ gcc/cp/typeck2.c	2010-07-02 10:55:58.000000000 +0200
@@ -1478,8 +1478,8 @@ build_m_component_ref (tree datum, tree 
   if (error_operand_p (datum) || error_operand_p (component))
     return error_mark_node;
 
-  mark_lvalue_use (datum);
-  mark_rvalue_use (component);
+  datum = mark_lvalue_use (datum);
+  component = mark_rvalue_use (component);
 
   ptrmem_type = TREE_TYPE (component);
   if (!TYPE_PTR_TO_MEMBER_P (ptrmem_type))
--- gcc/cp/class.c.jj	2010-07-01 08:45:31.000000000 +0200
+++ gcc/cp/class.c	2010-07-02 10:55:29.000000000 +0200
@@ -284,7 +284,7 @@ build_base_path (enum tree_code code,
     /* This must happen before the call to save_expr.  */
     expr = cp_build_unary_op (ADDR_EXPR, expr, 0, tf_warning_or_error);
   else
-    mark_rvalue_use (expr);
+    expr = mark_rvalue_use (expr);
 
   offset = BINFO_OFFSET (binfo);
   fixed_type_p = resolves_to_fixed_type_p (expr, &nonnull);
--- gcc/cp/call.c.jj	2010-07-01 08:45:31.000000000 +0200
+++ gcc/cp/call.c	2010-07-02 10:56:57.000000000 +0200
@@ -3861,8 +3861,8 @@ build_conditional_expr (tree arg1, tree 
       && same_type_p (arg2_type, arg3_type))
     {
       result_type = arg2_type;
-      mark_lvalue_use (arg2);
-      mark_lvalue_use (arg3);
+      arg2 = mark_lvalue_use (arg2);
+      arg3 = mark_lvalue_use (arg3);
       goto valid_operands;
     }
 
--- gcc/testsuite/c-c++-common/Wunused-var-12.c.jj	2010-07-02 11:10:18.000000000 +0200
+++ gcc/testsuite/c-c++-common/Wunused-var-12.c	2010-07-02 11:07:18.000000000 +0200
@@ -0,0 +1,25 @@
+/* PR c++/44780 */
+/* { dg-do compile } */
+/* { dg-options "-Wunused" } */
+
+typedef double vec __attribute__ ((__vector_size__ (16)));
+vec c, d;
+
+void
+foo (void)
+{
+  vec a;
+  vec b;
+  a = c;
+  b = a;
+  d = b;
+}
+
+void
+bar (void)
+{
+  vec a;
+  vec b;	/* { dg-warning "set but not used" } */
+  a = c;
+  b = a;
+}
