commit 5aba1b056466d0713a6479a364a96504bcfc93b9
Author: Jason Merrill <jason@redhat.com>
Date: Fri May 27 13:48:39 2011 -0400
PR c++/47132
* mangle.c (write_expression): Handle MODOP_EXPR.
@@ -2599,6 +2599,15 @@ write_expression (tree expr)
write_unqualified_id (fn);
write_template_args (TREE_OPERAND (expr, 1));
}
+ else if (TREE_CODE (expr) == MODOP_EXPR)
+ {
+ enum tree_code subop = TREE_CODE (TREE_OPERAND (expr, 1));
+ const char *name = (assignment_operator_name_info[(int) subop]
+ .mangled_name);
+ write_string (name);
+ write_expression (TREE_OPERAND (expr, 0));
+ write_expression (TREE_OPERAND (expr, 2));
+ }
else
{
int i, len;
new file mode 100644
@@ -0,0 +1,11 @@
+// PR c++/47132
+// { dg-options -std=c++0x }
+// { dg-final { scan-assembler "_Z1fIiEDToRfp_Li1EET_" } }
+
+template <typename T>
+auto f (T t) -> decltype(t |= 1);
+
+int main()
+{
+ f(1);
+}