public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/19284] New: Simple type names fail to demangle - regression from 3.2
@ 2005-01-05 23:53 david dot moore at intel dot com
  2005-01-05 23:55 ` [Bug libstdc++/19284] " david dot moore at intel dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: david dot moore at intel dot com @ 2005-01-05 23:53 UTC (permalink / raw)
  To: gcc-bugs

The following program works under gcc 3.2 but no longer works on 3.4. I believe 
this is a regression. (its actually a regression test from a different compiler)

Expected output shown in comments in program.

Seen on EL4 Preview Candidate using gcc version 3.4.3 20041125 (Redhat 3.4.3-
5.EL4)

// Pasted in because no way to attach files is being displayed in my browser 

//      Check some simple type names can be demangled
//      Expected output:
//      i:int: 0
//      c:char: 0
//      f:float: 0
//      d:double: 0
//      Seen output with gcc version 3.4.3 20041125
//      i:-2
//      c:-2
//      f:-2
//      d:-2


#include <iostream>
#include <typeinfo>

extern "C" char *__cxa_demangle(const char *, char *, size_t *, int *);

int demangle(const char *name)
{
    int s;
    char *d = __cxa_demangle(name, NULL, NULL, &s);
    std::cout << name << ":";
    if (d) std::cout << d << ": ";
    std::cout << s << std::endl;
    return 0;
}

int main() {
    demangle(typeid(int).name());
    demangle(typeid(char).name());
    demangle(typeid(float).name());
    demangle(typeid(double).name());
    return 0;
    }

-- 
           Summary: Simple type names fail to demangle - regression from 3.2
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: david dot moore at intel dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: IA32 EL4 Preview Candidate


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-01-06  1:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-05 23:53 [Bug libstdc++/19284] New: Simple type names fail to demangle - regression from 3.2 david dot moore at intel dot com
2005-01-05 23:55 ` [Bug libstdc++/19284] " david dot moore at intel dot com
2005-01-06  0:02 ` pcarlini at suse dot de
2005-01-06  0:09 ` david dot moore at intel dot com
2005-01-06  0:11 ` pcarlini at suse dot de
2005-01-06  1:00 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).