[Bug c/70688] New: bogus OpenACC data clause errors involving reductions
cesar at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Apr 15 20:42:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70688
Bug ID: 70688
Summary: bogus OpenACC data clause errors involving reductions
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Keywords: openacc
Severity: normal
Priority: P3
Component: c
Assignee: cesar at gcc dot gnu.org
Reporter: cesar at gcc dot gnu.org
CC: tschwinge at gcc dot gnu.org
Target Milestone: ---
Created attachment 38285
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38285&action=edit
test case
Here is the output of the attached test case when it is build with -fopenacc:
tr1.c: In function ‘sum’:
tr1.c:12:9: error: ‘s’ appears both in data and map clauses
#pragma acc parallel num_gangs (10) copy (s) reduction (+:s)
^~~
There are two problems with this. 1) the c FE should not be reporting a data
map clause error on a reduction variable. 2) That error only gets detected some
of the time, depending on the ordering of the clauses (e.g. a data clause
involving variable 'v' appears before a reduction clause involving 'v' in the
clause list). A third problem would be that this error message is not specific
to OpenACC.
The c++ FE also has a similar problem.
More information about the Gcc-bugs
mailing list