From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21884 invoked by alias); 22 Aug 2006 03:57:50 -0000 Received: (qmail 21862 invoked by uid 48); 22 Aug 2006 03:57:43 -0000 Date: Tue, 22 Aug 2006 03:57:00 -0000 Subject: [Bug libstdc++/28797] New: Problems with demangling (__cxa_demangle()) X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "kurkov at gorodok dot net" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-08/txt/msg01798.txt.bz2 List-Id: I used a simple program which calls __cxa_demangle function. These mangled names were demangled wrong: _Z1fA37_iPS_ -> f(int [37], int (*) [37]), should be: f(int[37], int (*) [37]) _Z1fILi2EEvRAplplT_Li3ELi1E_i -> void f<2>(int (&) [((2) + (3)) + (1)]), should be: void f<2>(int (&) [((2)+(3))+(1)]) _Z1fM1AKiPKS1_ -> _Z1fM1AKiPKS1_, should be: f(int const A::*, int const A::* const*) _Z3absILd1c1f1496f8a44219EEvv -> void abs<(double)[1c1f1496f8a44219]>(), should be: void abs<3.14159e-173>() _Z3absILd40092acd9e83e426EEvv -> void abs<(double)[40092acd9e83e426]>(), should be: void abs<3.1459>() _Z3absILe08042191a6cc56a2fe117becEEvv -> void abs<(long double)[08042191a6cc56a2fe117bec]>(), should be: void abs<1.234e-2345l>() _Z3absILe804bfff8000000000000000EEvv -> void abs<(long double)[804bfff8000000000000000]>(), should be: void abs<-1l>() _Z3absILf4016147bEEvv -> void abs<(float)[4016147b]>(), should be: void abs<2.345f>() _Z3absILfc1800000EEvv -> void abs<(float)[c1800000]>(), should be: void abs<-16f>() _Z3fooA30_A_i -> foo(int [30][]), should be: foo(int[30][]) _Z9function1PVKiPViPKiPi -> function1(int const volatile*, int volatile*, int const*, int*), should be: function1(int volatile const*, int volatile*, int const*, int*) _Z9function2PVKiPViPKiRS_RS1_RS3_ -> function2(int const volatile*, int volatile*, int const*, int const volatile&, int volatile&, int const&), should be: function2(int volatile const*, int volatile*, int const*, int volatile const&, int volatile&, int const&) _Z9function4PVKi -> function4(int const volatile*), should be: function4(int volatile const*) _Z9function5PVKi -> function5(int const volatile*), should be: function5(int volatile const*) _Z9function6PVKiS0_ -> function6(int const volatile*, int const volatile*), should be: function6(int volatile const*, int volatile const*) _Z9functionjj -> functionj(unsigned int), should be functionj(unsigned) _ZlsRKU3fooU4bart1XS0_ -> operator<<(X bart foo const&, X bart), should be: operator<<(X const foo bart&, X const foo bart) _ZN3FooIA4_iE3barE -> Foo::bar, should be: Foo::bar _Znaj -> operator new[](unsigned int), should be: operator new[](unsigned) _ZngILi42EEvN1AIXplT_Li2EEE1TE -> void operator-<42>(A<(42) + (2)>::T), should be: void operator-<42>(A<(42)+(2)>::T) _ZngILi42EEvN1AIXplT_Li2EEEE -> void operator-<42>(A<(42) + (2)>), should be: void operator-<42>(A<(42)+(2)>) _ZNSsC1EPKcRKSaIcE -> std::basic_string, std::allocator >::basic_string(char const*, std::allocator const&), should be: std::string::string(char const*, std::allocator const&) _Znwj -> operator new(unsigned int), should be: operator new(unsigned) _ZTv0_n16_NSoD0Ev -> virtual thunk to std::basic_ostream >::~basic_ostream(), should be: virtual thunk to std::ostream::~ostream() These issues you can reproduce on Mac OS, IA32 Linux and EM64T Linux Environment: IA32 and EM64T Linux: Red Hat Enterprise Linux WS release 4 (Nahant Update 3); Release: gcc version 3.4.5 20051201 (Red Hat 3.4.5-2) Environment: Mac OS Release: gcc -v Using built-in specs. Target: i686-apple-darwin8 Configured with: /private/var/tmp/gcc/gcc-5341.obj~1/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=powerpc-apple-darwin8 --with-arch=pentium-m --with-tune=prescott --program-prefix= --host=i686-apple-darwin8 --target=i686-apple-darwin8 Thread model: posix gcc version 4.0.1 (Apple Computer, Inc. build 5341) How-To-Repeat: Feed those mangled names to __cxa_demangle() function and check the results of demangling. This report is very close to Bug#:7986. -- Summary: Problems with demangling (__cxa_demangle()) Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: kurkov at gorodok dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28797