Hi Tom!

On Fri, 7 Nov 2014 14:59:45 +0100, Tom de Vries <tom_devr...@mentor.com> wrote:
> On 04-11-14 23:46, Tom de Vries wrote:
> > This patch fixes the libgomp-oacc.c/lib-66.c testcase.
> >
> > It allows the test to run for non-shared mem accelerators, and skips the 
> > test
> > otherwise.

> 2014-11-03  Tom de Vries  <t...@codesourcery.com>
> 
>       * testsuite/libgomp.oacc-c-c++-common/lib-66.c: Skip for shared memory
>       accelerators.
>       (main):  Use acc_device_default instead of acc_device_nvidia.

OK, thanks!

One note:

> --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-66.c
> +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/lib-66.c
> @@ -1,4 +1,5 @@
>  /* { dg-do run } */
> +/* { dg-skip-if "" { *-*-* } { "*" } { "-DACC_MEM_SHARED=0" } } */
>  
>  #include <string.h>
>  #include <stdlib.h>
> @@ -12,7 +13,7 @@ main (int argc, char **argv)
>    unsigned char *h;
>    void *d;
>  
> -  acc_init (acc_device_nvidia);
> +  acc_init (acc_device_default);

It doesn't hurt, but initializing with acc_device_default is the default
anyway.  But, you can keep this, to make sure that we actually do support
this.

>  
>    h = (unsigned char *) malloc (N);
>  
> @@ -41,7 +42,7 @@ main (int argc, char **argv)
>  
>    free (h);
>  
> -  acc_shutdown (acc_device_nvidia);
> +  acc_shutdown (acc_device_default);
>  
>    return 0;
>  }


Grüße,
 Thomas

Attachment: signature.asc
Description: PGP signature

Reply via email to