This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49418] New: openmp default(none) in template function
- From: "gcc-bug at safetymail dot info" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 Jun 2011 11:05:50 +0000
- Subject: [Bug c++/49418] New: openmp default(none) in template function
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49418
Summary: openmp default(none) in template function
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: gcc-bug@safetymail.info
Compilation fails, if within a template function a const argument is used
within an openmp parallel region with default(none).
If shared(x) is specified also a "predetermined 'shared'" error is produced.
Error:
$ g++ -fopenmp pf.cc
pf.cc: In function 'void g(T)':
pf.cc:11:45: error: 'x' is predetermined 'shared' for 'shared'
pf.cc: In function 'void f(T) [with T = int]':
pf.cc:5:8: error: 'x' not specified in enclosing parallel
pf.cc:5:8: error: enclosing parallel
pf.cc: In function 'void g(T) [with T = int]':
pf.cc:12:8: error: 'x' not specified in enclosing parallel
pf.cc:12:8: error: enclosing parallel
Version:
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/me/gcc/libexec/gcc/i686-pc-cygwin/4.6.0/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: ./configure --enable-languages=c,c++ --prefix=/home/me/gcc
--enable-libgomp
Thread model: single
gcc version 4.6.0 (GCC)