This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
V3 Testsuite Patch: instantiations for bitmap_allocator tests
- From: Mark Mitchell <mark at codesourcery dot com>
- To: libstdc++ at gcc dot gnu dot org
- Cc: gcc-patches at gcc dot gnu dot org
- Cc: dave dot anglin at nrc-cnrc dot gc dot ca
- Date: Sat, 16 Apr 2005 21:49:20 -0700
- Subject: V3 Testsuite Patch: instantiations for bitmap_allocator tests
- Reply-to: mark at codesourcery dot com
Dave Anglin has reported some testsuite failures on AIX 4.3.3, which
is a system without weak symbols. This patch should fix two of the
failures, by using the same explicit instantiation technique used
elsewhere in the V3 testsuite.
Dave, can you confirm that this patch fixes those two tests?
I plan to apply this patch 24 hours after getting confirmation from
Dave, unless there are objections. I've tested that I didn't break
the tests on x86_64-unknown-linux-gnu.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
2005-04-16 Mark Mitchell <mark@codesourcery.com>
* testsuite/ext/bitmap_allocator/check_allocate_max_size.cpp: Add
explicit instantiations for systems without weak symbols.
* testsuite/ext/bitmap_allocator/check_deallocate_null.cc:
Likewise.
Index: ext/bitmap_allocator/check_allocate_max_size.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/bitmap_allocator/check_allocate_max_size.cc,v
retrieving revision 1.1
diff -c -5 -p -r1.1 check_allocate_max_size.cc
*** ext/bitmap_allocator/check_allocate_max_size.cc 21 Oct 2004 00:06:01 -0000 1.1
--- ext/bitmap_allocator/check_allocate_max_size.cc 17 Apr 2005 04:41:08 -0000
***************
*** 20,31 ****
// 20.4.1.1 allocator members
#include <ext/bitmap_allocator.h>
#include <testsuite_allocator.h>
int main()
{
- typedef int value_type;
typedef __gnu_cxx::bitmap_allocator<value_type> allocator_type;
__gnu_test::check_allocate_max_size<allocator_type>();
return 0;
}
--- 20,37 ----
// 20.4.1.1 allocator members
#include <ext/bitmap_allocator.h>
#include <testsuite_allocator.h>
+ typedef int value_type;
+
int main()
{
typedef __gnu_cxx::bitmap_allocator<value_type> allocator_type;
__gnu_test::check_allocate_max_size<allocator_type>();
return 0;
}
+
+ #if !__GXX_WEAK
+ // Explicitly instantiatiate for systems without weak symbols.
+ template class __gnu_cxx::bitmap_allocator<value_type>;
+ #endif
Index: ext/bitmap_allocator/check_deallocate_null.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/bitmap_allocator/check_deallocate_null.cc,v
retrieving revision 1.1
diff -c -5 -p -r1.1 check_deallocate_null.cc
*** ext/bitmap_allocator/check_deallocate_null.cc 15 Oct 2004 10:54:56 -0000 1.1
--- ext/bitmap_allocator/check_deallocate_null.cc 17 Apr 2005 04:41:08 -0000
***************
*** 20,31 ****
// 20.4.1.1 allocator members
#include <ext/bitmap_allocator.h>
#include <testsuite_allocator.h>
int main()
{
- typedef int value_type;
typedef __gnu_cxx::bitmap_allocator<value_type> allocator_type;
__gnu_test::check_deallocate_null<allocator_type>();
return 0;
}
--- 20,39 ----
// 20.4.1.1 allocator members
#include <ext/bitmap_allocator.h>
#include <testsuite_allocator.h>
+ typedef int value_type;
+
int main()
{
typedef __gnu_cxx::bitmap_allocator<value_type> allocator_type;
__gnu_test::check_deallocate_null<allocator_type>();
return 0;
}
+
+ #if !__GXX_WEAK
+ // Explicitly instantiatiate for systems without weak symbols.
+ template class __gnu_cxx::bitmap_allocator<value_type>;
+ #endif
+
+