public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/27415] New: Iteration var in firstprivate or reduction clauses not reported
@ 2006-05-04 9:40 jakub at gcc dot gnu dot org
2006-05-16 16:52 ` [Bug middle-end/27415] " jakub at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-04 9:40 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/27415] Iteration var in firstprivate or reduction clauses not reported
2006-05-04 9:40 [Bug middle-end/27415] New: Iteration var in firstprivate or reduction clauses not reported jakub at gcc dot gnu dot org
@ 2006-05-16 16:52 ` jakub at gcc dot gnu dot org
2006-05-17 8:36 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-16 16:52 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-05-16 16:52:38
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27415
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/27415] Iteration var in firstprivate or reduction clauses not reported
2006-05-04 9:40 [Bug middle-end/27415] New: Iteration var in firstprivate or reduction clauses not reported jakub at gcc dot gnu dot org
2006-05-16 16:52 ` [Bug middle-end/27415] " jakub at gcc dot gnu dot org
@ 2006-05-17 8:36 ` jakub at gcc dot gnu dot org
2006-05-17 8:53 ` jakub at gcc dot gnu dot org
2006-05-29 22:51 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-17 8:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2006-05-17 08:35 -------
Subject: Bug 27415
Author: jakub
Date: Wed May 17 08:35:01 2006
New Revision: 113846
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113846
Log:
PR middle-end/27415
* tree.h (OMP_PARALLEL_COMBINED): Define.
* gimplify.c (struct gimplify_omp_ctx): Add is_combined_parallel field.
(new_omp_context): Add is_combined_parallel argument.
(gimplify_scan_omp_clauses): Add in_combined_parallel argument, adjust
new_omp_context caller.
(gimplify_omp_parallel, gimplify_omp_for, gimplify_omp_workshare):
Adjust gimplify_scan_omp_clauses callers.
(omp_is_private): Issue errors if iteration variable is firstprivate
or reduction in the current context.
* c-parser.c (c_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
on combined parallel workshare constructs.
cp/
* parser.c (cp_parser_omp_parallel): Set OMP_PARALLEL_COMBINED
on combined parallel workshare constructs.
* pt.c (tsubst_expr): Copy OMP_PARALLEL_COMBINED flag.
fortran/
* trans-openmp.c (gfc_trans_omp_parallel_do,
gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare): Set
OMP_PARALLEL_COMBINED flag.
testsuite/
* gcc.dg/gomp/pr27415.c: New test.
* g++.dg/gomp/pr27415.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/gomp/pr27415.C
trunk/gcc/testsuite/gcc.dg/gomp/pr27415.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-parser.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-openmp.c
trunk/gcc/gimplify.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.h
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27415
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/27415] Iteration var in firstprivate or reduction clauses not reported
2006-05-04 9:40 [Bug middle-end/27415] New: Iteration var in firstprivate or reduction clauses not reported jakub at gcc dot gnu dot org
2006-05-16 16:52 ` [Bug middle-end/27415] " jakub at gcc dot gnu dot org
2006-05-17 8:36 ` jakub at gcc dot gnu dot org
@ 2006-05-17 8:53 ` jakub at gcc dot gnu dot org
2006-05-29 22:51 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-05-17 8:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2006-05-17 08:53 -------
Fixed in SVN.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27415
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug middle-end/27415] Iteration var in firstprivate or reduction clauses not reported
2006-05-04 9:40 [Bug middle-end/27415] New: Iteration var in firstprivate or reduction clauses not reported jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-05-17 8:53 ` jakub at gcc dot gnu dot org
@ 2006-05-29 22:51 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-29 22:51 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27415
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-05-29 22:51 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-04 9:40 [Bug middle-end/27415] New: Iteration var in firstprivate or reduction clauses not reported jakub at gcc dot gnu dot org
2006-05-16 16:52 ` [Bug middle-end/27415] " jakub at gcc dot gnu dot org
2006-05-17 8:36 ` jakub at gcc dot gnu dot org
2006-05-17 8:53 ` jakub at gcc dot gnu dot org
2006-05-29 22:51 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).