This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24513] [gomp] Parsing problems with OpenMP directives inside member functions
- From: "martin at mpa-garching dot mpg dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Oct 2005 11:26:33 -0000
- Subject: [Bug c++/24513] [gomp] Parsing problems with OpenMP directives inside member functions
- References: <bug-24513-2736@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from martin at mpa-garching dot mpg dot de 2005-10-25 11:26 -------
This patch appears to work very well, thanks!
However, later in my code I run into a problem of the following sort:
The (patched) compiler rejects the following code
void bar (int *p)
{
#pragma omp parallel for
for (int m=0; m<1000; ++m)
{
switch(p[m])
{
case 1:
p[m]=2;
break;
}
}
}
~/tmp>g++ -fopenmp -c test.cc
test.cc: In function 'void bar(int*)':
test.cc:10: error: break statement used with OpenMP for loop
Is this really ill-formed code? It is accepted by all other compilers I tested.
I can open another bug report for this, but I'd like to make sure first that
this is not a consequence of the proposed patch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24513