Repeated use of the OpenACC routine directive

Cesar Philippidis
Fri Aug 19 14:39:00 GMT 2016

On 08/16/2016 06:05 PM, Thomas Schwinge wrote:
> On Mon, 01 Aug 2016 17:51:24 +0200, I wrote:
>> > We found that it's not correct that we currently unconditionally diagnose
>> > an error for repeated use of the OpenACC routine directive on one
>> > function/declaration.  (For reference, it is also permissible for an
>> > "ordinary" function to have several declarations plus a definition, as
>> > long as these are compatible.)  This is, the following shall be valid:
>> > 
>> >     #pragma acc routine worker
>> >     void f(void)
>> >     {
>> >     }
>> >     #pragma acc routine (f) worker
>> >     #pragma acc routine worker
>> >     extern void f(void);
>> > 
>> > [...]

Because of the different scoping rules, I don't think it makes sense to
allow users to repeat acc routine directives in fortran. Consequently, I
couldn't create a 1:1 of your c tests to fortran. However, after
inspecting your patch I did find some areas where fortran had
insufficient test coverage, specifically with routines inside interface
blocks and that warning for unutilized parallelism.

I've applied this patch, which addresses the acc routine test coverage
deficiencies in fortran, to gomp-4_0-branch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: more-routine-tests.diff
Type: text/x-patch
Size: 3193 bytes
Desc: not available
URL: <>

More information about the Gcc-patches mailing list