Hi Frederik!

On 2020-01-20T15:01:01+0100, "Harwath, Frederik" <frede...@codesourcery.com> 
wrote:
> I have attached a patch containing the changes that you suggested.

> On 16.01.20 17:00, Thomas Schwinge wrote:
>> On 2019-12-20T17:46:57+0100, "Harwath, Frederik" <frede...@codesourcery.com> 
>> wrote:
> Ok to push the commit to master?

Thanks, OK.  Reviewed-by: Thomas Schwinge <tho...@codesourcery.com>


As a low-priority follow-up, please look into:

    
source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_get_property-aux.c: 
In function 'expect_device_properties':
    
source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_get_property-aux.c:74:24:
 warning: format '%d' expects argument of type 'int', but argument 3 has type 
'const char *' [-Wformat=]
       74 |       fprintf (stderr, "Expected value of unknown string property 
to be NULL, "
          |                        
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       75 |         "but was %d.\n", s);
          |                          ~
          |                          |
          |                          const char *
    
source-gcc/libgomp/testsuite/libgomp.oacc-c-c++-common/acc_get_property-aux.c:75:19:
 note: format string is defined here
       75 |         "but was %d.\n", s);
          |                  ~^
          |                   |
          |                   int
          |                  %s

..., and (random example):

>    int unknown_property = 16058;
> -  int v = acc_get_property (dev_num, dev_type, 
> (acc_device_property_t)unknown_property);
> +  size_t v = acc_get_property (dev_num, dev_type, 
> (acc_device_property_t)unknown_property);
>    if (v != 0)
>      {
>        fprintf (stderr, "Expected value of unknown numeric property to equal 
> 0, "
> -            "but was %d.\n", v);
> +            "but was %zd.\n", v);
>        abort ();
>      }

..., shouldn't that be '%zu' given that 'size_t' is 'unsigned'?

    libgomp.oacc-c-c++-common/acc_get_property-aux.c:      fprintf (stderr, 
"Expected acc_property_memory to equal %zd, "
    libgomp.oacc-c-c++-common/acc_get_property-aux.c:            "but was 
%zd.\n", expected_memory, total_mem);
    libgomp.oacc-c-c++-common/acc_get_property-aux.c:            ", but free 
memory was %zd and total memory was %zd.\n",
    libgomp.oacc-c-c++-common/acc_get_property-aux.c:            "but was 
%zd.\n", v);
    libgomp.oacc-c-c++-common/acc_get_property.c:      printf ("    Total 
memory: %zd\n", v);
    libgomp.oacc-c-c++-common/acc_get_property.c:      printf ("    Free 
memory: %zd\n", v);


Grüße
 Thomas

Attachment: signature.asc
Description: PGP signature

Reply via email to