Hi!

richi reported a warning in omp-low.c with some configure options (forgot
which), this patch ensures we don't warn.
Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk.

2016-01-21  Jakub Jelinek  <ja...@redhat.com>

        * omp-low.c (expand_omp_target): Avoid -Wmaybe-uninitialized
        warning.  Fix up formatting.

--- gcc/omp-low.c.jj    2016-01-19 09:20:27.000000000 +0100
+++ gcc/omp-low.c       2016-01-19 11:37:05.053243550 +0100
@@ -13033,21 +13033,20 @@ expand_omp_target (struct omp_region *re
                                                     GOMP_ASYNC_SYNC));
        if (tagging && t_async)
          {
-           unsigned HOST_WIDE_INT i_async;
+           unsigned HOST_WIDE_INT i_async = GOMP_LAUNCH_OP_MAX;
 
            if (TREE_CODE (t_async) == INTEGER_CST)
              {
                /* See if we can pack the async arg in to the tag's
                   operand.  */
                i_async = TREE_INT_CST_LOW (t_async);
-
                if (i_async < GOMP_LAUNCH_OP_MAX)
                  t_async = NULL_TREE;
+               else
+                 i_async = GOMP_LAUNCH_OP_MAX;
              }
-           if (t_async)
-             i_async = GOMP_LAUNCH_OP_MAX;
-           args.safe_push (oacc_launch_pack
-                           (GOMP_LAUNCH_ASYNC, NULL_TREE, i_async));
+           args.safe_push (oacc_launch_pack (GOMP_LAUNCH_ASYNC, NULL_TREE,
+                                             i_async));
          }
        if (t_async)
          args.safe_push (t_async);

        Jakub

Reply via email to