This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix PR target/59207


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.


-- 
Eric Botcazou
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;
 	    }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]