This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/27415] New: Iteration var in firstprivate or reduction clauses not reported
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2006 09:39:44 -0000
- Subject: [Bug middle-end/27415] New: Iteration var in firstprivate or reduction clauses not reported
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
void
foo (void)
{
int i = 0;
#pragma omp parallel
#pragma omp for firstprivate (i) /* { dg-error "predetermined iteration
var i must not be firstprivate" } */
for (i = 0; i < 10; i++)
;
}
void
bar (void)
{
int i = 0;
#pragma omp parallel for firstprivate (i) /* { dg-error "predetermined
iteration var i must not be firstprivate" } */
for (i = 0; i < 10; i++)
;
}
or
void
foo (void)
{
int i = 0;
#pragma omp parallel
#pragma omp for reduction (+:i) /* { dg-error "predetermined iteration var i
must not be reduction" } */
for (i = 0; i < 10; i++)
;
}
void
bar (void)
{
int i = 0;
#pragma omp parallel for reduction (*:i) /* { dg-error "predetermined
iteration var i must not be reduction" } */
for (i = 0; i < 10; i++)
;
}
are compiled without any errors, but 2.8.1.1 says that the omp for / omp
parallel for loop iteration variable may be only listed in private or
lastprivate clause.
--
Summary: Iteration var in firstprivate or reduction clauses not
reported
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: openmp
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27415