public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36046]  New: Demangler fails on templates with non-type reference parameters
@ 2008-04-25 13:55 jjk at acm dot org
  2008-04-25 13:57 ` [Bug c++/36046] " jjk at acm dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: jjk at acm dot org @ 2008-04-25 13:55 UTC (permalink / raw)
  To: gcc-bugs

See attached test case.


-- 
           Summary: Demangler fails on templates with non-type reference
                    parameters
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jjk at acm dot org
  GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux


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


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

* [Bug c++/36046] Demangler fails on templates with non-type reference parameters
  2008-04-25 13:55 [Bug c++/36046] New: Demangler fails on templates with non-type reference parameters jjk at acm dot org
@ 2008-04-25 13:57 ` jjk at acm dot org
  2008-04-26  0:22 ` [Bug other/36046] " bangerth at dealii dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jjk at acm dot org @ 2008-04-25 13:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jjk at acm dot org  2008-04-25 13:57 -------
Created an attachment (id=15531)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15531&action=view)
Test case.


-- 


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


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

* [Bug other/36046] Demangler fails on templates with non-type reference parameters
  2008-04-25 13:55 [Bug c++/36046] New: Demangler fails on templates with non-type reference parameters jjk at acm dot org
  2008-04-25 13:57 ` [Bug c++/36046] " jjk at acm dot org
@ 2008-04-26  0:22 ` bangerth at dealii dot org
  2008-04-26  0:26 ` bangerth at dealii dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2008-04-26  0:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from bangerth at dealii dot org  2008-04-26 00:22 -------
Confirmed. The demangler gets a valid symbol it can't demangle.
W.


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bangerth at dealii dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-04-26 00:22:12
               date|                            |


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


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

* [Bug other/36046] Demangler fails on templates with non-type reference parameters
  2008-04-25 13:55 [Bug c++/36046] New: Demangler fails on templates with non-type reference parameters jjk at acm dot org
  2008-04-25 13:57 ` [Bug c++/36046] " jjk at acm dot org
  2008-04-26  0:22 ` [Bug other/36046] " bangerth at dealii dot org
@ 2008-04-26  0:26 ` bangerth at dealii dot org
  2008-04-26  0:40 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2008-04-26  0:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from bangerth at dealii dot org  2008-04-26 00:25 -------
By the way, the return code of __cxa_demangle is
  -2: mangled_name is not a valid name under the C++ ABI mangling rules.
as per 
 
http://docs.mandragor.org/files/Programming_languages/Cpp/libstdcpp_v3_Source_Documentation/namespaceabi.html

The string that can't be demangled is "3barILZ3bazEE".

W.


-- 


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


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

* [Bug other/36046] Demangler fails on templates with non-type reference parameters
  2008-04-25 13:55 [Bug c++/36046] New: Demangler fails on templates with non-type reference parameters jjk at acm dot org
                   ` (2 preceding siblings ...)
  2008-04-26  0:26 ` bangerth at dealii dot org
@ 2008-04-26  0:40 ` pinskia at gcc dot gnu dot org
  2008-04-26  0:48 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-04-26  0:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2008-04-26 00:39 -------
This is expected, we should not be demangling types with __cxa_demangle.


-- 


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


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

* [Bug other/36046] Demangler fails on templates with non-type reference parameters
  2008-04-25 13:55 [Bug c++/36046] New: Demangler fails on templates with non-type reference parameters jjk at acm dot org
                   ` (3 preceding siblings ...)
  2008-04-26  0:40 ` pinskia at gcc dot gnu dot org
@ 2008-04-26  0:48 ` pinskia at gcc dot gnu dot org
  2008-04-26  0:53 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-04-26  0:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2008-04-26 00:47 -------
Ok, this is a generic demangler issue, we don't demangle _Z1f3barILZ3bazEE
either.
Which is f(bar<baz>) but only because it is mangled incorrectly in the first
place.

So the real issue here is that the demangle only handles correctly mangled
names.
_Z1f3barIL_Z3bazEE is the correct mangling.


-- 


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


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

* [Bug other/36046] Demangler fails on templates with non-type reference parameters
  2008-04-25 13:55 [Bug c++/36046] New: Demangler fails on templates with non-type reference parameters jjk at acm dot org
                   ` (4 preceding siblings ...)
  2008-04-26  0:48 ` pinskia at gcc dot gnu dot org
@ 2008-04-26  0:53 ` pinskia at gcc dot gnu dot org
  2008-04-26  0:58 ` ian at airs dot com
  2008-05-05  5:29 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-04-26  0:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2008-04-26 00:53 -------
so all three versions mangle it differently
if we have f(bar<baz>)
1: _Z1f3barIXadL_Z3bazEEE
2: _Z1f3barILZ3bazEE
3: _Z1f3barIL_Z3bazEE
I think 3 is correct as the underscore is needed and the address is not
supplied..

but the default value is 2 right now

I don't know if we should "fix" up the mangler to accept version 2 at all.


-- 


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


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

* [Bug other/36046] Demangler fails on templates with non-type reference parameters
  2008-04-25 13:55 [Bug c++/36046] New: Demangler fails on templates with non-type reference parameters jjk at acm dot org
                   ` (5 preceding siblings ...)
  2008-04-26  0:53 ` pinskia at gcc dot gnu dot org
@ 2008-04-26  0:58 ` ian at airs dot com
  2008-05-05  5:29 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: ian at airs dot com @ 2008-04-26  0:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from ian at airs dot com  2008-04-26 00:57 -------
See bug #16240 for some background.


-- 


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


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

* [Bug other/36046] Demangler fails on templates with non-type reference parameters
  2008-04-25 13:55 [Bug c++/36046] New: Demangler fails on templates with non-type reference parameters jjk at acm dot org
                   ` (6 preceding siblings ...)
  2008-04-26  0:58 ` ian at airs dot com
@ 2008-05-05  5:29 ` pinskia at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-05-05  5:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2008-05-05 05:28 -------
As mentioned in the other bug report, it is hard to handle the -fabi-version=2
version of the mangled string.  We handle correctly the correctly mangled
already.

So closing as won't fix.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


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


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

end of thread, other threads:[~2008-05-05  5:29 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-25 13:55 [Bug c++/36046] New: Demangler fails on templates with non-type reference parameters jjk at acm dot org
2008-04-25 13:57 ` [Bug c++/36046] " jjk at acm dot org
2008-04-26  0:22 ` [Bug other/36046] " bangerth at dealii dot org
2008-04-26  0:26 ` bangerth at dealii dot org
2008-04-26  0:40 ` pinskia at gcc dot gnu dot org
2008-04-26  0:48 ` pinskia at gcc dot gnu dot org
2008-04-26  0:53 ` pinskia at gcc dot gnu dot org
2008-04-26  0:58 ` ian at airs dot com
2008-05-05  5:29 ` 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).