This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libstdc++/4701: imbue(locale("de_DE")) not working


Unfortunately, named locales still do not work on my system with a gcc
3.1 compiler bootstrapped some hours ago today. Maybe we have
different glibc versions? Also note that running the libstdc++
regression test suite shows these failures:

		=== libstdc++-v3 tests ===


Running target unix
FAIL: 22_locale/codecvt.cc (test for excess errors)
FAIL: 22_locale/ctor_copy_dtor.cc execution test
FAIL: 22_locale/facet.cc execution test
FAIL: 27_io/ios_manip_fmtflags.cc execution test

The first three failures are not present for the gcc 3.0.2 compiler.

My system setup is: Glibc 2.2, Linux 2.4.10, i686-pc-linux-gnu,
binutils version version 2.11.90.0.23, SuSE 7.1.

Hope this helps,

Peter Schmid

source code tl.C
#include <iostream>
#include <locale>
using namespace std;

int main()
{
    cout.imbue(locale("de_DE"));
}

Compiling tl.C

g++ -v -o tl tl.C -W -Wall -g
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc/configure --enable-shared --enable-threads=posix --enable-languages=c,c++,f77,objc --disable-nls --enable-clocale=gnu
Thread model: posix
gcc version 3.1 20011026 (experimental)
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -W -Wall -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ tl.C -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase tl.C -g -W -Wall -version -o /tmp/ccaMJIkE.s
GNU CPP version 3.1 20011026 (experimental) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.1 20011026 (experimental) (i686-pc-linux-gnu)
	compiled by GNU C version 3.1 20011026 (experimental).
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++-v3
 /usr/local/include/g++-v3/i686-pc-linux-gnu
 /usr/local/include/g++-v3/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../../../i686-pc-linux-gnu/bin/as -V -Qy -o /tmp/cc9qnrbi.o /tmp/ccaMJIkE.s
GNU assembler version 2.11.90.0.23 (i686-pc-linux-gnu) using BFD version 2.11.90.0.23
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o tl /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/crtbegin.o -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1 -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../../../i686-pc-linux-gnu/lib -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../.. /tmp/cc9qnrbi.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/crtend.o /usr/lib/crtn.o

Running tl
./tl
Aborted (core dumped)

Debugging tl

GNU gdb 5.0
Copyright 2001 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...
(gdb) r

Program received signal SIGABRT, Aborted.
0x40113bc1 in __kill () from /lib/libc.so.6
(gdb) bt
#0  0x40113bc1 in __kill () from /lib/libc.so.6
#1  0x401139c5 in raise () from /lib/libc.so.6
#2  0x40114fe1 in abort () from /lib/libc.so.6
#3  0x40068647 in __cxxabiv1::__terminate(void (*)()) (
    handler=0x40114f10 <abort>)
    at ../../../../gcc/libstdc++-v3/libsupc++/eh_terminate.cc:47
#4  0x40068684 in std::terminate() ()
    at ../../../../gcc/libstdc++-v3/libsupc++/eh_terminate.cc:57
#5  0x4006885d in __cxa_rethrow ()
    at ../../../../gcc/libstdc++-v3/libsupc++/eh_throw.cc:101
#6  0x4005ffda in std::locale::_Impl::_Impl(std::string, unsigned) (
    this=0x804bb80, __str=0xbffff730, __refs=1)
    at ../../../../gcc/libstdc++-v3/src/localename.cc:85
#7  0x4005a91e in std::locale::locale(char const*) (this=0xbffff784, 
    __s=0x804986c "de_DE")
    at /mnt/egcs/build/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_alloc.h:600
#8  0x0804917b in main () at tl.C:7
#9  0x40103baf in __libc_start_main () from /lib/libc.so.6

On 26 Oct 2001 bkoz@gcc.gnu.org wrote:

> Synopsis: imbue(locale("de_DE")) not working
> 
> Responsible-Changed-From-To: unassigned->bkoz
> Responsible-Changed-By: bkoz
> Responsible-Changed-When: Fri Oct 26 11:32:51 2001
> Responsible-Changed-Why:
>     Mine.
> State-Changed-From-To: open->feedback
> State-Changed-By: bkoz
> State-Changed-When: Fri Oct 26 11:32:51 2001
> State-Changed-Why:
>     Hey Peter, I can longer reproduce this, with either gnu or generic locale models. Are you still having problems?
> 
> http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&pr=4701&database=gcc
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]