On Solaris 11, we observed execution abort for the testcase below:
+libstdc++.sum:FAIL: ext/throw_allocator/check_delete.cc execution test

The testcase check_delete.cc and its related header files are included in the
attachment bug.tar.
# g++ check_delete.cc -D_GLIBCXX_ASSERT -I.
# ./a.out
Assertion failed: bool(__gnu_test::check_delete<allocator_type, true>()), file
check_delete.cc, line 48
Abort (core dumped)

The error is triggered by defining mt_allocator as the base class to
std::allocator in c++allocator.h. It could be gone by including c++allocator.h
in new/bits/ which define new_allocator as base class. 
# g++ check_delete.cc -D_GLIBCXX_ASSERT -I. -I./new
# ./a.out

We configured gcc 4.3.2 with --enable-libstdcxx-allocator=mt as well as other
options as below. 
# g++ -v
Using built-in specs.
Target: sparc-sun-solaris2.11
Configured with: /import/iropt5/lijuan/plain-gcc/gcc-4.3.2/configure
--prefix=/import/iropt5/lijuan/plain-gcc/compilers/gcc-4.3.2 --enable-shared
--disable-static --with-system-zlib --enable-checking=release
--enable-languages=c,c++ --disable-libobjc --with-cpu=v9
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --with-as=/usr/ccs/bin/as
--without-gnu-as --disable-gnattools --enable-tls
--enable-libstdcxx-allocator=mt
Thread model: posix
gcc version 4.3.2 (GCC)
# uname -a
SunOS gccfss-v890-1 5.11 snv_111 sun4u sparc SUNW,Sun-Fire-V890

Please verify if it's a real bug in gcc or not. If you need any other
information, please let me know. Thanks.


-- 
           Summary: ext/throw_allocator/check_delete.cc execution abort with
                    mt_allocator
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hailijuan at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39775

Reply via email to