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

From-SVN: r259288

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

index f1da5c359b0caa7ddf73860cf26b4d49218032fa..57cf6130d09a58ae872e278d8abdc6a627efeb93 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  Jakub Jelinek  <jakub@redhat.com>
 
        PR rtl-optimization/85300
index fe7f8af856e424a6e567e20884148ba24702f82e..2471cb83b9e1f61869296136364c80a0d40aba1b 100644 (file)
@@ -10,6 +10,7 @@ main ()
 {
   int i, sum;
 
+  sum = 0;
   for (i = 0; i < 10; i++)
     sum += a[i];