public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38650] New: [4.3/4.4 regression] Trouble with volatile and #pragma omp for
@ 2008-12-28 0:23 reichelt at gcc dot gnu dot org
2008-12-28 0:24 ` [Bug c++/38650] " reichelt at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-12-28 0:23 UTC (permalink / raw)
To: gcc-bugs
There is some strange behavior with #pragma omp for and volatiles:
=================================
void foo()
{
volatile int i, j = 1;
#pragma omp for
for (i = 0; i < j; i += 1)
;
}
=================================
bug.cc: In function 'void foo()':
bug.cc:4: internal compiler error: in gimplify_omp_for, at gimplify.c:5880
Please submit a full bug report, [etc.]
A similar code snippet (using ++i instead of i+=1 as incrememt) is accepted:
=================================
void foo()
{
volatile int i, j = 1;
#pragma omp for
for (i = 0; i < j; ++i)
;
}
=================================
Another slight variation (using i<1 instead of i<j as loop condition)
is rejected:
=================================
void foo()
{
volatile int i;
#pragma omp for
for (i = 0; i < 1; ++i)
;
}
=================================
bug.cc: In function 'void foo()':
bug.cc:5: error: invalid controlling predicate
The above only holds for the C++ frontend since GCC 4.3.0.
With the C frontend or GCC 4.2.x all three snippets compile fine.
I looked into the specification of OpenMP 3.0 and found nothing forbidding
the use of volatiles as loop counters. On the other hand volatile is IMHO
against the semantics of parallel for where magically changing loop counters
would make no sense. Maybe that's even a defect of the OpenMP specification.
--
Summary: [4.3/4.4 regression] Trouble with volatile and #pragma
omp for
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, rejects-valid, monitored, openmp
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38650
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38650] [4.3/4.4 regression] Trouble with volatile and #pragma omp for
2008-12-28 0:23 [Bug c++/38650] New: [4.3/4.4 regression] Trouble with volatile and #pragma omp for reichelt at gcc dot gnu dot org
@ 2008-12-28 0:24 ` reichelt at gcc dot gnu dot org
2008-12-28 17:52 ` jakub at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-12-28 0:24 UTC (permalink / raw)
To: gcc-bugs
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38650
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38650] [4.3/4.4 regression] Trouble with volatile and #pragma omp for
2008-12-28 0:23 [Bug c++/38650] New: [4.3/4.4 regression] Trouble with volatile and #pragma omp for reichelt at gcc dot gnu dot org
2008-12-28 0:24 ` [Bug c++/38650] " reichelt at gcc dot gnu dot org
@ 2008-12-28 17:52 ` jakub at gcc dot gnu dot org
2008-12-28 20:08 ` jakub at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-12-28 17: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 |2008-12-28 17:50:13
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38650
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38650] [4.3/4.4 regression] Trouble with volatile and #pragma omp for
2008-12-28 0:23 [Bug c++/38650] New: [4.3/4.4 regression] Trouble with volatile and #pragma omp for reichelt at gcc dot gnu dot org
2008-12-28 0:24 ` [Bug c++/38650] " reichelt at gcc dot gnu dot org
2008-12-28 17:52 ` jakub at gcc dot gnu dot org
@ 2008-12-28 20:08 ` jakub at gcc dot gnu dot org
2008-12-28 20:12 ` [Bug c++/38650] [4.3 " jakub at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-12-28 20:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2008-12-28 20:07 -------
Subject: Bug 38650
Author: jakub
Date: Sun Dec 28 20:06:00 2008
New Revision: 142940
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142940
Log:
PR c++/38650
* semantics.c (finish_omp_for): Don't add CLEANUP_POINT_EXPR
around volatile iteration var in condition and/or increment
expression.
* testsuite/libgomp.c/pr38650.c: New test.
* testsuite/libgomp.c++/pr38650.C: New test.
Added:
trunk/libgomp/testsuite/libgomp.c++/pr38650.C
trunk/libgomp/testsuite/libgomp.c/pr38650.c
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/libgomp/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38650
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38650] [4.3 regression] Trouble with volatile and #pragma omp for
2008-12-28 0:23 [Bug c++/38650] New: [4.3/4.4 regression] Trouble with volatile and #pragma omp for reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-12-28 20:08 ` jakub at gcc dot gnu dot org
@ 2008-12-28 20:12 ` jakub at gcc dot gnu dot org
2008-12-29 23:01 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-12-28 20:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2008-12-28 20:10 -------
Fixed on the trunk so far.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.3.2
Known to work| |4.4.0
Summary|[4.3/4.4 regression] Trouble|[4.3 regression] Trouble
|with volatile and #pragma |with volatile and #pragma
|omp for |omp for
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38650
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38650] [4.3 regression] Trouble with volatile and #pragma omp for
2008-12-28 0:23 [Bug c++/38650] New: [4.3/4.4 regression] Trouble with volatile and #pragma omp for reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-12-28 20:12 ` [Bug c++/38650] [4.3 " jakub at gcc dot gnu dot org
@ 2008-12-29 23:01 ` rguenth at gcc dot gnu dot org
2009-01-24 10:28 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-29 23:01 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38650
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38650] [4.3 regression] Trouble with volatile and #pragma omp for
2008-12-28 0:23 [Bug c++/38650] New: [4.3/4.4 regression] Trouble with volatile and #pragma omp for reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-12-29 23:01 ` rguenth at gcc dot gnu dot org
@ 2009-01-24 10:28 ` rguenth at gcc dot gnu dot org
2009-08-04 12:46 ` rguenth at gcc dot gnu dot org
2010-05-22 18:28 ` rguenth at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-24 10:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-01-24 10:21 -------
GCC 4.3.3 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.3 |4.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38650
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38650] [4.3 regression] Trouble with volatile and #pragma omp for
2008-12-28 0:23 [Bug c++/38650] New: [4.3/4.4 regression] Trouble with volatile and #pragma omp for reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2009-01-24 10:28 ` rguenth at gcc dot gnu dot org
@ 2009-08-04 12:46 ` rguenth at gcc dot gnu dot org
2010-05-22 18:28 ` rguenth at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2009-08-04 12:29 -------
GCC 4.3.4 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.4 |4.3.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38650
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/38650] [4.3 regression] Trouble with volatile and #pragma omp for
2008-12-28 0:23 [Bug c++/38650] New: [4.3/4.4 regression] Trouble with volatile and #pragma omp for reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2009-08-04 12:46 ` rguenth at gcc dot gnu dot org
@ 2010-05-22 18:28 ` rguenth at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-22 18:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2010-05-22 18:13 -------
GCC 4.3.5 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.5 |4.3.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38650
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-05-22 18:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-28 0:23 [Bug c++/38650] New: [4.3/4.4 regression] Trouble with volatile and #pragma omp for reichelt at gcc dot gnu dot org
2008-12-28 0:24 ` [Bug c++/38650] " reichelt at gcc dot gnu dot org
2008-12-28 17:52 ` jakub at gcc dot gnu dot org
2008-12-28 20:08 ` jakub at gcc dot gnu dot org
2008-12-28 20:12 ` [Bug c++/38650] [4.3 " jakub at gcc dot gnu dot org
2008-12-29 23:01 ` rguenth at gcc dot gnu dot org
2009-01-24 10:28 ` rguenth at gcc dot gnu dot org
2009-08-04 12:46 ` rguenth at gcc dot gnu dot org
2010-05-22 18:28 ` rguenth 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).