This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/24513] New: [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 06:07:18 -0000
- Subject: [Bug c++/24513] New: [gomp] Parsing problems with OpenMP directives inside member functions
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The current head of the gomp-branch fails to compile the following code:
class foo
{
void f(int *p)
{
#pragma omp parallel for
for (int i=0; i<1000; ++i)
p[i]=0;
}
};
martin@amd64:~/tmp> g++ -v -c -fopenmp test.cc
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /home/martin/software/gompcc/configure --quiet
--prefix=/home/martin/software/ugccgomp --enable-languages=c++,f95
--disable-checking
Thread model: posix
gcc version 4.1.0-gomp-20050608-branch 20051023 (experimental) (merged
20051023)
/home/martin/software/ugccgomp/libexec/gcc/x86_64-unknown-linux-gnu/4.1.0-gomp-20050608-branch/cc1plus
-quiet -v -D_GNU_SOURCE test.cc -quiet -dumpbase test.cc -mtune=k8 -auxbase
test -version -fopenmp -o /tmp/ccdXf56z.s
ignoring nonexistent directory
"/home/martin/software/ugccgomp/lib/gcc/x86_64-unknown-linux-gnu/4.1.0-gomp-20050608-branch/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/home/martin/software/ugccgomp/lib/gcc/x86_64-unknown-linux-gnu/4.1.0-gomp-20050608-branch/../../../../include/c++/4.1.0-gomp-20050608-branch
/home/martin/software/ugccgomp/lib/gcc/x86_64-unknown-linux-gnu/4.1.0-gomp-20050608-branch/../../../../include/c++/4.1.0-gomp-20050608-branch/x86_64-unknown-linux-gnu
/home/martin/software/ugccgomp/lib/gcc/x86_64-unknown-linux-gnu/4.1.0-gomp-20050608-branch/../../../../include/c++/4.1.0-gomp-20050608-branch/backward
/usr/local/include
/home/martin/software/ugccgomp/include
/home/martin/software/ugccgomp/lib/gcc/x86_64-unknown-linux-gnu/4.1.0-gomp-20050608-branch/include
/usr/include
End of search list.
GNU C++ version 4.1.0-gomp-20050608-branch 20051023 (experimental) (merged
20051023) (x86_64-unknown-linux-gnu)
compiled by GNU C version 3.3.5 20050117 (prerelease) (SUSE Linux).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=127998
Compiler executable checksum: 7685608de8a349c87881fcb97aefe90b
test.cc:5: error: expected `}' before end of line
test.cc: In member function ?void foo::f(int*)?:
test.cc:5: error: expected ?#pragma omp? clause at end of input
test.cc:5: confused by earlier errors, bailing out
--
Summary: [gomp] Parsing problems with OpenMP directives inside
member functions
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: martin at mpa-garching dot mpg dot de
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24513