aboutsummaryrefslogtreecommitdiff
path: root/gcc/omp-low.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-01-21 00:55:38 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-01-21 00:55:38 +0100
commit73bfae68ebe09d58d650e458d507018f9633b440 (patch)
treebb73fcd5bd09cec1e0838665e21d8c705135da59 /gcc/omp-low.c
parentbdd3aea68b3f6b83b48676aea4c38ac457e02fdf (diff)
downloadgcc-73bfae68ebe09d58d650e458d507018f9633b440.zip
gcc-73bfae68ebe09d58d650e458d507018f9633b440.tar.gz
gcc-73bfae68ebe09d58d650e458d507018f9633b440.tar.bz2
omp-low.c (expand_omp_target): Avoid -Wmaybe-uninitialized warning.
* omp-low.c (expand_omp_target): Avoid -Wmaybe-uninitialized warning. Fix up formatting. From-SVN: r232641
Diffstat (limited to 'gcc/omp-low.c')
-rw-r--r--gcc/omp-low.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 673dee3..2977082 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -13328,21 +13328,20 @@ expand_omp_target (struct omp_region *region)
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);