public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/49418] New: openmp default(none) in template function
@ 2011-06-15 11:06 gcc-bug at safetymail dot info
  2011-06-15 11:07 ` [Bug c++/49418] " gcc-bug at safetymail dot info
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: gcc-bug at safetymail dot info @ 2011-06-15 11:06 UTC (permalink / raw)
  To: gcc-bugs

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)


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-06-27 20:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-15 11:06 [Bug c++/49418] New: openmp default(none) in template function gcc-bug at safetymail dot info
2011-06-15 11:07 ` [Bug c++/49418] " gcc-bug at safetymail dot info
2011-06-21 13:33 ` jakub at gcc dot gnu.org
2011-06-21 13:35 ` jakub at gcc dot gnu.org
2011-06-21 13:42 ` jakub at gcc dot gnu.org
2011-06-21 14:35 ` jason at gcc dot gnu.org
2011-06-21 18:59 ` [Bug c++/49418] [4.6/4.7 regression] G++ discards cv-quals from template parameter types jason at gcc dot gnu.org
2011-06-21 19:05 ` jason at gcc dot gnu.org
2011-06-21 19:08 ` [Bug c++/49418] [4.6 " jason at gcc dot gnu.org
2011-06-24  2:19 ` jason at gcc dot gnu.org
2011-06-27 20:16 ` jason at gcc dot gnu.org
2011-06-27 20:18 ` jason at gcc dot gnu.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).