]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PR target/85056] Address -Wmaybe-uninitialized diagnostic
authorThomas Schwinge <thomas@codesourcery.com>
Tue, 10 Apr 2018 16:55:55 +0000 (18:55 +0200)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Tue, 10 Apr 2018 16:55:55 +0000 (18:55 +0200)
gcc/testsuite/
* gcc.target/nvptx/pr85056.c (main): Initialize "sum".

trunk r259288

From-SVN: r259290

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/nvptx/pr85056.c

index 955b32d233baa5291c3935155b64c26ac0e831b4..572b25233327f028993add77b51a850c758c83df 100644 (file)
@@ -1,3 +1,8 @@
+2018-04-10  Thomas Schwinge  <thomas@codesourcery.com>
+
+       PR target/85056
+       * gcc.target/nvptx/pr85056.c (main): Initialize "sum".
+
 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        Backport from mainline
index fe7f8af856e424a6e567e20884148ba24702f82e..2471cb83b9e1f61869296136364c80a0d40aba1b 100644 (file)
@@ -10,6 +10,7 @@ main ()
 {
   int i, sum;
 
+  sum = 0;
   for (i = 0; i < 10; i++)
     sum += a[i];