This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

help with simple? program


Hi there.  I'm exploring some improvement to the money_put facet based on the
fp printing stuff in progress, but I've hit a stumbling block.  I want to
create a performance test for money_put, so I created the following test
program:

#include <locale>
#include <iostream>

using namespace std;
int main()
{
  const money_put<char>& mp = use_facet<money_put<char> >(locale("en_US"));
  mp.put(cout, false, cout, cout.fill(), 45333);
}


This is on 686 linux with cpu=athlon.  If I use locale(""), the program works
fine and prints what I expect.  But when I use en_US, I get a segfault in
mp.put.  Running locale -a on the command line shows the existence of en_US.
In gdb 6.1.1 I see the segfault as soon as I try to step into
money_put.do_put, after the arguments to put() have finished their code.

Can anyone else confirm what I'm seeing?  This is a fresh checkout and
bootstrap on debian testing.

../gcc/configure   --program-suffix=dev --with-system-zlib --with-cpu=athlon
--enable-languages=c,c++,java

Thanks,
Jerry


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