diff mbox

Fix PR target/59207

Message ID 20689475.zqiy4tqT8J@polaris
State New
Headers show

Commit Message

Eric Botcazou Nov. 20, 2013, 5 p.m. UTC
This fixes an uninitialized variable introduced by the double_int rewrite.

Tested on SPARC/Solaris, applied on the mainline and 4.8 branch.


2013-11-20  Eric Botcazou <ebotcazou@adacore.com>

	PR target/59207
	* config/sparc/sparc.c (sparc_fold_builtin) <case CODE_FOR_pdist_vis>:
	Make sure neg2_ovf is set before being used.
diff mbox

Patch

Index: config/sparc/sparc.c
===================================================================
--- config/sparc/sparc.c	(revision 205090)
+++ config/sparc/sparc.c	(working copy)
@@ -10658,7 +10658,8 @@  sparc_fold_builtin (tree fndecl, int n_a
 	      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;
 	    }