* [committed] Fix a warning in omp-low.c
@ 2016-01-17 18:08 Jakub Jelinek
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2016-01-17 18:08 UTC (permalink / raw)
To: gcc-patches
Hi!
This fixes a warning in mark_loops_in_oacc_kernels_region.
Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk.
2016-01-17 Jakub Jelinek <jakub@redhat.com>
* omp-low.c (mark_loops_in_oacc_kernels_region): Work around
-Wmaybe-uninitialized warning.
--- gcc/omp-low.c.jj 2016-01-14 22:31:22.000000000 +0100
+++ gcc/omp-low.c 2016-01-16 11:30:49.321974885 +0100
@@ -12539,7 +12539,7 @@ mark_loops_in_oacc_kernels_region (basic
/* Don't parallelize the kernels region if it contains more than one outer
loop. */
unsigned int nr_outer_loops = 0;
- struct loop *single_outer;
+ struct loop *single_outer = NULL;
for (struct loop *loop = outer->inner; loop != NULL; loop = loop->next)
{
gcc_assert (loop_outer (loop) == outer);
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* [committed] Fix a warning in omp-low.c
@ 2016-01-20 23:57 Jakub Jelinek
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Jelinek @ 2016-01-20 23:57 UTC (permalink / raw)
To: gcc-patches
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-20 23:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-17 18:08 [committed] Fix a warning in omp-low.c Jakub Jelinek
2016-01-20 23:57 Jakub Jelinek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).