2011-07-14 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/49309
* tree-mudflap.c (mf_xform_derefs_1 <case MEM_REF>):
Use fold_build2_loc instead of build2.
Use the correct type for the new tree.
2011-07-14 Andrew Pinski <pinskia@gmail.com>
PR tree-opt/49309
* g++.dg/torture/pr49309.C: New testcase.
From-SVN: r176281
+2011-07-14 Andrew Pinski <pinskia@gmail.com>
+
+ PR tree-opt/49309
+ * tree-mudflap.c (mf_xform_derefs_1 <case MEM_REF>):
+ Use fold_build2_loc instead of build2.
+ Use the correct type for the new tree.
+
2011-07-14 Bernd Schmidt <bernds@codesourcery.com>
PR rtl-optimization/11320
+2011-07-14 Andrew Pinski <pinskia@gmail.com>
+
+ PR tree-opt/49309
+ * g++.dg/torture/pr49309.C: New testcase.
+
2011-07-14 Bernd Schmidt <bernds@codesourcery.com>
* gcc.dg/pr48770.c: Add dg-require-effective-target fpic.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fmudflap" } */
+struct A
+{
+ int i;
+
+ A();
+ A(const A&);
+};
+
+inline void foo(A a) { a = A(); }
+
+void bar() { foo(A()); }
+
break;
case MEM_REF:
- addr = build2 (POINTER_PLUS_EXPR, TREE_TYPE (TREE_OPERAND (t, 1)),
+ addr = fold_build2_loc (location, POINTER_PLUS_EXPR, TREE_TYPE (TREE_OPERAND (t, 0)),
TREE_OPERAND (t, 0),
fold_convert (sizetype, TREE_OPERAND (t, 1)));
base = addr;