[openacc, committed] Fix diff_type in expand_oacc_collapse_init

Tom de Vries Tom_deVries@mentor.com
Wed Feb 7 20:19:00 GMT 2018


On 02/07/2018 08:37 PM, Rainer Orth wrote:
> Hi Tom,
> 
>> this patch fixes an 8 regression in an openacc testcase.
>>
>> The regression was introduced by r250925, a fix for PR78266, a bug in the
>> handling of a loop with iteration variable type range smaller than the size
>> of the parallel dimension the loop is assigned to.
>>
>> The fix for the regression is to apply the r250925 fix (in expand_oacc_for)
>> to expand_oacc_collapse_init as well.
>>
>> Build and reg-tested on x86_64 with nvptx accelerator.
>>
>> Committed to stage4 trunk.
> [...]
>> 	* testsuite/libgomp.oacc-c-c++-common/pr84217.c: New test.
> 
> this test FAILs when compiled as C++:
> 
> +FAIL: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/pr84217.c -DACC_DEVICE_TYPE_host=1 -DACC_MEM_SHARED=1  -O2  (test for excess errors)
> +UNRESOLVED: libgomp.oacc-c++/../libgomp.oacc-c-c++-common/pr84217.c -DACC_DEVIC
> E_TYPE_host=1 -DACC_MEM_SHARED=1  -O2  compilation failed to produce executable
> 
> Excess errors:
> Undefined                       first referenced
>   symbol                             in file
> abort()                             /var/tmp//ccSsAnFc.o
> 
> (seen on i386-pc-solaris2.11 and sparc-sun-solaris2.11).
> 
> Fixed as follows, tested with the appropriate runtest invocations,
> installed on mainline.
> 
> 	Rainer
> 

Hi Rainer,

thanks for fixing this oversight of mine.

- Tom

> 
> libgomp-pr84217-c++.patch
> 
> 
> # HG changeset patch
> # Parent  e5c3e710215181503b228de2f9277e543392df2a
> Fix libgomp.oacc-c-c++-common/pr84217.c for C++
> 
> diff --git a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84217.c b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84217.c
> --- a/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84217.c
> +++ b/libgomp/testsuite/libgomp.oacc-c-c++-common/pr84217.c
> @@ -1,4 +1,8 @@
> -extern void abort (void);
> +extern
> +#ifdef __cplusplus
> +"C"
> +#endif
> +void abort (void);
>   
>   #define N 10
>   
> 



More information about the Gcc-patches mailing list