https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100428

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |nvptx

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Minimized to:
...
#include <stdio.h>
#include <assert.h>

int
main (void)
{
  unsigned int i, j;
  unsigned int out;

  #pragma acc parallel num_gangs(1) num_workers(1) vector_length(32) \
                       copyout(out)
  {
    for (j = 1; j < 2; j++)
      {
        unsigned int acc = 0;

        #pragma acc loop vector reduction(+:acc)
        for (i = 0; i < 32; i++)
          acc += 1;

        out = acc;
      }
  }

  printf ("out: %u\n", out);
  fflush (0);
  assert (out == 32);

  return 0;
}
...
which gives us:
...
Execution timeout is: 300
spawn [open ...]^M
out: 1
reduction-7.exe: reduction-7.c:27: main: Assertion `out == 32' failed.
FAIL: libgomp.oacc-c/../libgomp.oacc-c-c++-common/reduction-7.c
-DACC_DEVICE_TYPE_nvidia=1 -DACC_MEM_SHARED=0 -foffload=nvptx-none  -O0 
execution test
...

Reply via email to