From a9a130f5b732433cb7b1e185e499d0494ffcc2f9 Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 20 Nov 2013 17:02:36 +0000 Subject: [PATCH] re PR target/59207 (uninitialized local variable in sparc_fold_builtin) PR target/59207 * config/sparc/sparc.c (sparc_fold_builtin) : Make sure neg2_ovf is set before being used. From-SVN: r205127 --- gcc/ChangeLog | 14 ++++++++++---- gcc/config/sparc/sparc.c | 3 ++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9e0d643fea9b..7a2ea53ef061 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,10 +1,16 @@ +2013-11-20 Eric Botcazou + + PR target/59207 + * config/sparc/sparc.c (sparc_fold_builtin) : + Make sure neg2_ovf is set before being used. + 2013-11-20 Basile Starynkevitch - * plugin.def: Add comment about register_callback and - invoke_plugin_callbacks_full. + * plugin.def: Add comment about register_callback and + invoke_plugin_callbacks_full. - * plugin.c (register_callback, invoke_plugin_callbacks_full): - Handle PLUGIN_INCLUDE_FILE event. + * plugin.c (register_callback, invoke_plugin_callbacks_full): + Handle PLUGIN_INCLUDE_FILE event. 2013-11-20 Ulrich Weigand diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index cabf8f0d244d..8bdc9bb6bc6b 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -10658,7 +10658,8 @@ sparc_fold_builtin (tree fndecl, int n_args ATTRIBUTE_UNUSED, tmp = e0.add_with_sign (tmp, false, &add1_ovf); if (tmp.is_negative ()) tmp = tmp.neg_with_overflow (&neg2_ovf); - + else + neg2_ovf = false; result = result.add_with_sign (tmp, false, &add2_ovf); overflow |= neg1_ovf | neg2_ovf | add1_ovf | add2_ovf; } -- 2.47.3