[Bug c++/31708] New: threadprivate with function block static reports incomplete type
Yesterday (2007-4-25) I downloaded gcc 4.2 and ran into a problem with g++ as illustrated here: templateclass T struct xyz { T x, y, z; }; templateclass T struct myclass { void fun(void); }; templateclass T void myclassT::fun(void) { static xyzT var; #ifdef _OPENMP #pragma omp threadprivate(var) #endif } int main(void) { } % g++ -fopenmp code.cc code.cc: In member function 'void myclassT::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
[Bug libstdc++/29529] purify with iostream reports 128 uninitialized memory reads
--- Comment #2 from mstaley at lanl dot gov 2006-10-25 22:38 --- (In reply to comment #1) This is most likely a purify problem. Have you tried using valgrind instead? I just tried valgrind. I'm not really familiar with valgrind, but as far as I can tell it reports no problems. So, either purify is wrong, valgrind is wrong, or they're both wrong in different ways. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29529
[Bug c++/29529] New: purify with iostream reports 128 uninitialized memory reads
When I compile this code: #include iostream int main(void) { } with g++, instrumented with the purify utility, purify reports the following: UMR: Uninitialized memory read (128 times) This is occurring while in: __gconv_get_alias_db [libc.so.6] wctob [libc.so.6] std::ctype wchar_t::_M_initialize_ctype( void) [libstdc++.so.6] std::ctype wchar_t::ctype( unsigned) [libstdc++.so.6] std::locale::_Impl::_Impl( unsigned) [libstdc++.so.6] std::locale::_Impl::_Impl( unsigned) [libstdc++.so.6] Reading 4 bytes from 0xbfa77a24 on the stack. Address 0xbfa77a24 is 84 bytes below frame pointer in function wctob Dunno if this is a g++ problem, purify problem, OS problem, system library problem, not really an error, or whatever, but it would be nice to make it go away. System/compiler info: uname -a Linux banat 2.6.15-26-686 #1 SMP PREEMPT Mon Jul 17 20:14:14 UTC 2006 i686 GNU/Linux g++ --version g++ (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5) Without iostream, no problem. -- Summary: purify with iostream reports 128 uninitialized memory reads Product: gcc Version: 4.0.3 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=29529
[Bug c++/29425] New: template template + default parameter = selection failure
Maybe you've got this already but I don't see it. The following fails to compile (reports an ambiguity) in g++ 4.0.3: #include iostream templateclass A, class B=int class two { }; templateclass T struct print { void operator()(void) const { std::cout 1 std::endl; } }; templatetemplateclass class T, class A struct print TA { void operator()(void) const { std::cout 2 std::endl; } }; templatetemplateclass, class class T, class A, class B struct print TA,B { void operator()(void) const { std::cout 3 std::endl; } }; int main(void) { print twoint,int ()(); } Two other compilers I've tried, Portland Group and Intel, compile the code; the executables print 3. That's what I'd have expected. If class B isn't defaulted in class template two, there's no problem. Martin -- Summary: template template + default parameter = selection failure Product: gcc Version: 4.0.3 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=29425