On Wed, Nov 04, 2015 at 10:32:52AM +0100, Richard Biener wrote: > On Tue, Nov 3, 2015 at 5:53 PM, Marek Polacek <pola...@redhat.com> wrote: > > The last piece for convert.c. Since convert_to_real uses fold () > > rather than fold_buildN, I defined a new macro to keep the code > > more compact. > > > > With this committed, convert.c should be dealt with. If there's > > anything else I could help with, please let me know. > > > > Bootstrapped/regtested on x86_64-linux, ok for branch? > > I wonder what happens (on trunk) when you just remove the fold () calls.
Nothing much, at least the following patch passes testing. Bootstrapped/regtested on x86_64-linux. 2015-11-04 Marek Polacek <pola...@redhat.com> * convert.c (convert_to_real): Remove calls to fold. diff --git gcc/convert.c gcc/convert.c index 113c11f..8ef1949 100644 --- gcc/convert.c +++ gcc/convert.c @@ -211,7 +211,7 @@ convert_to_real (tree type, tree expr) if (fn) { - tree arg = fold (convert_to_real (newtype, arg0)); + tree arg = convert_to_real (newtype, arg0); expr = build_call_expr (fn, 1, arg); if (newtype == type) return expr; @@ -235,8 +235,7 @@ convert_to_real (tree type, tree expr) && FLOAT_TYPE_P (itype) && TYPE_PRECISION (type) < TYPE_PRECISION (itype)) return build1 (TREE_CODE (expr), type, - fold (convert_to_real (type, - TREE_OPERAND (expr, 0)))); + convert_to_real (type, TREE_OPERAND (expr, 0))); break; /* Convert (outertype)((innertype0)a+(innertype1)b) into ((newtype)a+(newtype)b) where newtype @@ -272,8 +271,8 @@ convert_to_real (tree type, tree expr) || newtype == dfloat128_type_node) { expr = build2 (TREE_CODE (expr), newtype, - fold (convert_to_real (newtype, arg0)), - fold (convert_to_real (newtype, arg1))); + convert_to_real (newtype, arg0), + convert_to_real (newtype, arg1)); if (newtype == type) return expr; break; @@ -312,8 +311,8 @@ convert_to_real (tree type, tree expr) && !excess_precision_type (newtype)))) { expr = build2 (TREE_CODE (expr), newtype, - fold (convert_to_real (newtype, arg0)), - fold (convert_to_real (newtype, arg1))); + convert_to_real (newtype, arg0), + convert_to_real (newtype, arg1)); if (newtype == type) return expr; } Marek