Bootstrap with -fsanitize=undefined revealed that the alg variable
may be used uninitialized.  Or at least gcc thinks so.  This patch
initializes it to 0.

Regtested/bootstrapped on x86_64-linux, ok for trunk?

2013-12-18  Marek Polacek  <pola...@redhat.com>

        * config/i386/i386.c (ix86_parse_stringop_strategy_string): Initialize
        alg to 0.

--- gcc/config/i386/i386.c.mp   2013-12-18 13:38:21.908138307 +0100
+++ gcc/config/i386/i386.c      2013-12-18 13:38:41.417214628 +0100
@@ -2856,7 +2856,7 @@ ix86_parse_stringop_strategy_string (cha
   do
     {
       int maxs;
-      stringop_alg alg;
+      stringop_alg alg = (stringop_alg) 0;
       char alg_name[128];
       char align[16];
       next_range_str = strchr (curr_range_str, ',');

        Marek

Reply via email to