From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31246 invoked by alias); 20 Sep 2002 11:46:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 31227 invoked by uid 71); 20 Sep 2002 11:46:02 -0000 Resent-Date: 20 Sep 2002 11:46:02 -0000 Resent-Message-ID: <20020920114602.31226.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, johnb@stl.sarov.ru Received: (qmail 31200 invoked by uid 61); 20 Sep 2002 11:45:44 -0000 Message-Id: <20020920114544.31199.qmail@sources.redhat.com> Date: Fri, 20 Sep 2002 04:46:00 -0000 From: johnb@stl.sarov.ru Reply-To: johnb@stl.sarov.ru To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: libstdc++/7986: Problems with demangling (__cxa_demangle()) X-SW-Source: 2002-09/txt/msg00594.txt.bz2 List-Id: >Number: 7986 >Category: libstdc++ >Synopsis: Problems with demangling (__cxa_demangle()) >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Fri Sep 20 04:46:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: johnb@stl.sarov.ru >Release: gcc 3.2, gcc 3.1 >Organization: >Environment: Red Hat Linux 8.0beta >Description: 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]) _Z1fM1AFivEPS0_ -> f(int (A::*)(), int ()()*), should be: f(int (A::*)(), int (*)()) _Z1fPFPA1_ivE -> f(int (*) [1] (*)()), should be: f(int (*(*)()) [1]) _Z1fPKM1AFivE -> f(int (A::*)() const*), should be: f(int (A::* const*)()) _Z1jM1AFivEPS1_ -> j(int (A::*)(), int (A::*)()*), should be: j(int (A::*)(), int (A::**)()) _Z1sPA37_iPS0_ -> s(int (*) [37], int (*) [37]*), should be: s(int (*) [37], int (**) [37]) _Z3fooA30_A_i -> foo(int[][30]), should be: foo(int[30][]) _Z3kooPA28_A30_i -> koo(int[30] (*) [28]), should be: koo(int (*) [28][30]) _ZlsRKU3fooU4bart1XS0_ -> operator<<(foo bart X const&, bart X), should be: operator<<(X const foo bart&, X const foo bart) And in these cases __cxa_demangle() returned -2 (Invalid mangled name): _Z1fM1AKFivE -> _Z1fM1AKFivE, should be: f(int (A::*)() const) _Z3absILd1c1f1496f8a44219EEvv -> _Z3absILd1c1f1496f8a44219EEvv, should be: void abs<3.14159e-173>() _Z3absILd40092acd9e83e426EEvv -> _Z3absILd40092acd9e83e426EEvv, should be: void abs<3.1459>() _Z3absILe08042191a6cc56a2fe117becEEvv -> _Z3absILe08042191a6cc56a2fe117becEEvv, should be: void abs<1.234e-2345l>() _Z3absILe804bfff8000000000000000EEvv -> _Z3absILe804bfff8000000000000000EEvv, should be: void abs<-1l>() _Z3absILf4016147bEEvv -> _Z3absILf4016147bEEvv, should be: void abs<2.345f>() _Z3absILfc1800000EEvv -> _Z3absILfc1800000EEvv, should be: void abs<-16f>() >How-To-Repeat: Feed those mangled names to __cxa_demangle() function and check the results of demangling. >Fix: >Release-Note: >Audit-Trail: >Unformatted: