g++ -v:
Using built-in specs.
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch=i686
--build=i686-redhat-linux
Thread model: posix
gcc version 4.4.3 20100127 (Red Hat 4.4.3-4) (GCC) 


Command line used to compile the example program:
g++ -o main main.cpp

For some template types the output of abi::__cxa_demangle is incorrect.

This was working OK in version 4.3.0

Example program is attached

Expected output (when compiled with gcc version 4.3.0 20080428 (Red Hat
4.3.0-8)):

Mangled name:
N5boost6tuples5tupleIN5abcde5xyzzz3abc4abcd3AaaENS5_4klmn16BaaaaaaaaaaaaaaaENS0_9null_typeES9_S9_S9_S9_S9_S9_S9_EE

Demangled name:

boost::tuples::tuple<abcde::xyzzz::abc::abcd::Aaa,
abcde::xyzzz::abc::abcd::klmn::Baaaaaaaaaaaaaaa, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>




Actual output (when compiled with gcc version 4.4.3 20100127 (Red Hat
4.4.3-4)):

Mangled name:
N5boost6tuples5tupleIN5abcde5xyzzz3abc4abcd3AaaENS5_4klmn16BaaaaaaaaaaaaaaaENS0_9null_typeES9_S9_S9_S9_S9_S9_S9_EE

Demangled name:

boost::tuples::tuple<abcde::xyzzz::abc::abcd::Aaa,
abcde::xyzzz::abc::abcd::klmn::Baaaaaaaaaaaaaaa, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_ty>


As you can see the last occurrence of "null_type" gets truncated to "null_ty".
The mangled name is the same for both compiler versions.

Note that after making some of the namespace or class names shorter the output
is correct.


-- 
           Summary: Incorrect output from abi::__cxa_demangle
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: slawomir at ezono dot com


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

Reply via email to