This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix a warning in omp-low.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 21 Jan 2016 00:57:06 +0100
- Subject: [committed] Fix a warning in omp-low.c
- Authentication-results: sourceware.org; auth=none
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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 <jakub@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