public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31708] New: threadprivate with function block static reports incomplete type
@ 2007-04-26 0:06 mstaley at lanl dot gov
2007-04-26 6:32 ` [Bug c++/31708] " theodore dot papadopoulo at sophia dot inria dot fr
2007-04-27 23:47 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: mstaley at lanl dot gov @ 2007-04-26 0:06 UTC (permalink / raw)
To: gcc-bugs
Yesterday (2007-4-25) I downloaded gcc 4.2 and ran into a problem with g++
as illustrated here:
template<class T>
struct xyz {
T x, y, z;
};
template<class T>
struct myclass {
void fun(void);
};
template<class T>
void myclass<T>::fun(void)
{
static xyz<T> var;
#ifdef _OPENMP
#pragma omp threadprivate(var)
#endif
}
int main(void)
{
}
% g++ -fopenmp code.cc
code.cc: In member function 'void myclass<T>::fun()':
code.cc:16: error: 'threadprivate' 'var' has incomplete type
Perhaps I'm missing something, but I don't see how var's type can
be incomplete in this example.
Note: compiles if either or both of xyz and myclass is a non-template,
so this doesn't seem to be the same problem reported in 27557.
--
Summary: threadprivate with function block static reports
incomplete type
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mstaley at lanl dot gov
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31708
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/31708] threadprivate with function block static reports incomplete type
2007-04-26 0:06 [Bug c++/31708] New: threadprivate with function block static reports incomplete type mstaley at lanl dot gov
@ 2007-04-26 6:32 ` theodore dot papadopoulo at sophia dot inria dot fr
2007-04-27 23:47 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: theodore dot papadopoulo at sophia dot inria dot fr @ 2007-04-26 6:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from theodore dot papadopoulo at sophia dot inria dot fr 2007-04-26 07:32 -------
This is a duplicate of PR 31598 (which was against 4.3 not 4.2).
Jakub Jelinek proposed a patch
(http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01572.html) that seems to be
accepted but is not yet commited.
At least a recent 4.3 compiler with the patch added seems to compile the
testcase.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31708
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c++/31708] threadprivate with function block static reports incomplete type
2007-04-26 0:06 [Bug c++/31708] New: threadprivate with function block static reports incomplete type mstaley at lanl dot gov
2007-04-26 6:32 ` [Bug c++/31708] " theodore dot papadopoulo at sophia dot inria dot fr
@ 2007-04-27 23:47 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-27 23:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-04-28 00:46 -------
*** This bug has been marked as a duplicate of 31598 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31708
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-04-27 23:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-26 0:06 [Bug c++/31708] New: threadprivate with function block static reports incomplete type mstaley at lanl dot gov
2007-04-26 6:32 ` [Bug c++/31708] " theodore dot papadopoulo at sophia dot inria dot fr
2007-04-27 23:47 ` pinskia 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).