[Patch 2/5] OpenACC tile clause support, omp-low parts

Jakub Jelinek jakub@redhat.com
Thu Feb 9 15:21:00 GMT 2017


On Tue, Nov 29, 2016 at 08:23:45PM +0800, Chung-Lin Tang wrote:
> Adjusted and re-tested using the way you advised, attached updated patch.

This broke bootstrap on all arches:
../../gcc/omp-offload.c: In function ‘unsigned int oacc_loop_auto_partitions(oacc_loop*, unsigned int, bool)’:
../../gcc/omp-offload.c:1255:18: warning: suggest parentheses around operand of ‘!’ or change ‘|’ to ‘||’ or ‘!’ to ‘~’ [-Wparentheses]
   if (assign && (!outer_assign | loop->inner))
                  ^~~~~~~~~~~~~

It isn't immediately clear what you wanted to do there,
but in order to quickly fix the bootstrap problem, I've committed
following patch.  If you meant something different (such as
  if (assign && !(outer_assign || loop->inner))
), please submit a fix for review and make sure to bootstrap and regtest it.

2017-02-09  Jakub Jelinek  <jakub@redhat.com>

	* omp-offload.c (oacc_loop_auto_partitions): Use || instead of |
	to avoid warning.

--- gcc/omp-offload.c.jj	2017-02-09 15:00:09.000000000 +0100
+++ gcc/omp-offload.c	2017-02-09 16:16:01.344737892 +0100
@@ -1252,7 +1252,7 @@ oacc_loop_auto_partitions (oacc_loop *lo
   noisy = false;
 #endif
 
-  if (assign && (!outer_assign | loop->inner))
+  if (assign && (!outer_assign || loop->inner))
     {
       /* Allocate outermost and non-innermost loops at the outermost
 	 non-innermost available level.  */


	Jakub



More information about the Gcc-patches mailing list