public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41233] Templated conversion operator produces symbol name that won't demangle
       [not found] <bug-41233-4@http.gcc.gnu.org/bugzilla/>
@ 2012-01-06 18:01 ` jason at gcc dot gnu.org
  2012-01-20  5:22 ` jason at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2012-01-06 18:01 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-06
                 CC|                            |jason at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2012-01-06 18:00:50 UTC ---
This message to the ABI list deals with the same issue:

http://sourcery.mentor.com/archives/cxx-abi-dev/msg02295.html


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

* [Bug c++/41233] Templated conversion operator produces symbol name that won't demangle
       [not found] <bug-41233-4@http.gcc.gnu.org/bugzilla/>
  2012-01-06 18:01 ` [Bug c++/41233] Templated conversion operator produces symbol name that won't demangle jason at gcc dot gnu.org
@ 2012-01-20  5:22 ` jason at gcc dot gnu.org
  2012-01-20 10:41 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu.org @ 2012-01-20  5:22 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |meheff at gcc dot gnu.org

--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2012-01-20 04:03:51 UTC ---
*** Bug 37677 has been marked as a duplicate of this bug. ***


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

* [Bug c++/41233] Templated conversion operator produces symbol name that won't demangle
       [not found] <bug-41233-4@http.gcc.gnu.org/bugzilla/>
  2012-01-06 18:01 ` [Bug c++/41233] Templated conversion operator produces symbol name that won't demangle jason at gcc dot gnu.org
  2012-01-20  5:22 ` jason at gcc dot gnu.org
@ 2012-01-20 10:41 ` paolo.carlini at oracle dot com
  2012-11-26 10:24 ` glisse at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 10+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-01-20 10:41 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|gcc-bugs at gcc dot gnu.org |iant at google dot com

--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-20 10:28:27 UTC ---
Ian, are you aware of this standing issue? Thanks in advance.


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

* [Bug c++/41233] Templated conversion operator produces symbol name that won't demangle
       [not found] <bug-41233-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2012-01-20 10:41 ` paolo.carlini at oracle dot com
@ 2012-11-26 10:24 ` glisse at gcc dot gnu.org
  2022-11-20 19:40 ` pinskia at gcc dot gnu.org
  2022-11-20 20:17 ` zack+srcbugz at owlfolio dot org
  5 siblings, 0 replies; 10+ messages in thread
From: glisse at gcc dot gnu.org @ 2012-11-26 10:24 UTC (permalink / raw)
  To: gcc-bugs


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

Marc Glisse <glisse at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |glisse at gcc dot gnu.org

--- Comment #8 from Marc Glisse <glisse at gcc dot gnu.org> 2012-11-26 10:24:23 UTC ---
Note that such undemanglable symbols now appear in cc1 and cc1plus:
_ZN5vnullcv3vecIT_T0_T1_EI10double_int7va_heap6vl_ptrEEv and 55 other variants.


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

* [Bug c++/41233] Templated conversion operator produces symbol name that won't demangle
       [not found] <bug-41233-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2012-11-26 10:24 ` glisse at gcc dot gnu.org
@ 2022-11-20 19:40 ` pinskia at gcc dot gnu.org
  2022-11-20 20:17 ` zack+srcbugz at owlfolio dot org
  5 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-20 19:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41233

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Zack Weinberg from comment #0)
> 
>   _ZN9convertercvPT_I4DestEEv
[apinski@xeond2 stage1-gcc]$ c++filt _ZN9convertercvPT_I4DestEEv
converter::operator Dest*<Dest>()

This now demangles as of 2.30.
>   _ZN9convertercvPT_IN4DestEEEv

So does this.

[apinski@xeond2 stage1-gcc]$ c++filt _ZN9convertercvPT_IN4DestEEEv
converter::operator Dest*<Dest>()

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

* [Bug c++/41233] Templated conversion operator produces symbol name that won't demangle
       [not found] <bug-41233-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2022-11-20 19:40 ` pinskia at gcc dot gnu.org
@ 2022-11-20 20:17 ` zack+srcbugz at owlfolio dot org
  5 siblings, 0 replies; 10+ messages in thread
From: zack+srcbugz at owlfolio dot org @ 2022-11-20 20:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41233

--- Comment #10 from Zack Weinberg <zack+srcbugz at owlfolio dot org> ---
The examples found by other people still don't demangle, though...

$ c++filt --version 2>&1 | head -n1
GNU c++filt (GNU Binutils for Debian) 2.39
$ c++filt <<\EOF
_ZNK3FooIPvEcvS_IT_EIiEEv
_ZN5vnullcv3vecIT_T0_T1_EI10double_int7va_heap6vl_ptrEEv
EOF
_ZNK3FooIPvEcvS_IT_EIiEEv
_ZN5vnullcv3vecIT_T0_T1_EI10double_int7va_heap6vl_ptrEEv

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

* [Bug c++/41233] Templated conversion operator produces symbol name that won't demangle
  2009-09-03  0:21 [Bug c++/41233] New: " zackw at panix dot com
                   ` (2 preceding siblings ...)
  2010-02-25 20:02 ` jim at clkda dot com
@ 2010-05-29  8:17 ` gcc at magfr dot user dot lysator dot liu dot se
  3 siblings, 0 replies; 10+ messages in thread
From: gcc at magfr dot user dot lysator dot liu dot se @ 2010-05-29  8:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from gcc at magfr dot user dot lysator dot liu dot se  2010-05-29 08:17 -------
I have run head-first into this problem as well.

I have found that _ZN1tcvT_IiEEv ( t::operator int<int>() ) works but
_ZN1tcvKT_IiEEv ( t::operator int const<int>() ) fails so it seems the problem
is that the template isn't detected, and looking at the code in
libiberty/cp-demangle.c (r159908) we have line 4689 that tries to detect if the
cast target is a template type but only handles the case where the type is
unadorned by anything and then there is the comment on lines 4696-4699 that
explains the problem.


-- 

gcc at magfr dot user dot lysator dot liu dot se changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gcc at magfr dot user dot
                   |                            |lysator dot liu dot se


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


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

* [Bug c++/41233] Templated conversion operator produces symbol name that won't demangle
  2009-09-03  0:21 [Bug c++/41233] New: " zackw at panix dot com
  2010-02-25 16:33 ` [Bug c++/41233] " jim at clkda dot com
  2010-02-25 16:35 ` jim at clkda dot com
@ 2010-02-25 20:02 ` jim at clkda dot com
  2010-05-29  8:17 ` gcc at magfr dot user dot lysator dot liu dot se
  3 siblings, 0 replies; 10+ messages in thread
From: jim at clkda dot com @ 2010-02-25 20:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jim at clkda dot com  2010-02-25 20:01 -------
I think the T_ is not handling the forward reference to the not-yet-specified
first template parameter correctly.  For the original example, replacing T_
with N4DestE gives something that *looks* right although is probably not
correct:

_ZN9convertercvPN4DestEI4DestEEv

which demangles to converter::operator Dest*<Dest>().

Similarly, in the second example, if I replace T_ with i, I get

_ZNK3FooIPvEcvS_IiEIiEEv

which demangles to Foo<void*>::operator Foo<int><int>() const.

http://www.codesourcery.com/public/cxx-abi/abi.html#mangling is helpful.


-- 


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


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

* [Bug c++/41233] Templated conversion operator produces symbol name that won't demangle
  2009-09-03  0:21 [Bug c++/41233] New: " zackw at panix dot com
  2010-02-25 16:33 ` [Bug c++/41233] " jim at clkda dot com
@ 2010-02-25 16:35 ` jim at clkda dot com
  2010-02-25 20:02 ` jim at clkda dot com
  2010-05-29  8:17 ` gcc at magfr dot user dot lysator dot liu dot se
  3 siblings, 0 replies; 10+ messages in thread
From: jim at clkda dot com @ 2010-02-25 16:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jim at clkda dot com  2010-02-25 16:35 -------
I ran into this as well.  My un-demanglable symbol is
_ZNK3FooIPvEcvS_IT_EIiEEv.  Here's my info and attached test case is
demangle.ii:

/usr/bin/g++4 -v -save-temps -c -o demangle.o demangle.ccUsing built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --with-gxx-include-dir=/usr/include/c++/3.4.3
--enable-libgcj-multifile --enable-languages=c,c++,java,f95
--enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic
--host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)
 /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/cc1plus -E -quiet -v -D_GNU_SOURCE
demangle.cc -mtune=generic -fpch-preprocess -o demangle.ii
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/3.4.3
 /usr/include/c++/3.4.3/x86_64-redhat-linux
 /usr/include/c++/3.4.3/backward
 /usr/local/include
 /usr/lib/gcc/x86_64-redhat-linux/4.1.2/include
 /usr/include
End of search list.
 /usr/libexec/gcc/x86_64-redhat-linux/4.1.2/cc1plus -fpreprocessed demangle.ii
-quiet -dumpbase demangle.cc -mtune=generic -auxbase-strip demangle.o -version
-o demangle.s
GNU C++ version 4.1.2 20070626 (Red Hat 4.1.2-14) (x86_64-redhat-linux)
        compiled by GNU C version 4.1.2 20070626 (Red Hat 4.1.2-14).
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 184adf145435f56fdcc7b1a1fb1af981
 as -V -Qy -o demangle.o demangle.s
GNU assembler version 2.15.92.0.2 (x86_64-redhat-linux) using BFD version
2.15.92.0.2 20040927


-- 


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


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

* [Bug c++/41233] Templated conversion operator produces symbol name that won't demangle
  2009-09-03  0:21 [Bug c++/41233] New: " zackw at panix dot com
@ 2010-02-25 16:33 ` jim at clkda dot com
  2010-02-25 16:35 ` jim at clkda dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: jim at clkda dot com @ 2010-02-25 16:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jim at clkda dot com  2010-02-25 16:33 -------
Created an attachment (id=19956)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19956&action=view)
Preprocessor output of code that produces a symbol that can't be demangled.

The symbol that can't be demangled is _ZNK3FooIPvEcvS_IT_EIiEEv, which should
correspond to 

template <typename T>
template <typename U>
Foo<T>::operator Foo<U>() const;


-- 


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


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

end of thread, other threads:[~2022-11-20 20:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-41233-4@http.gcc.gnu.org/bugzilla/>
2012-01-06 18:01 ` [Bug c++/41233] Templated conversion operator produces symbol name that won't demangle jason at gcc dot gnu.org
2012-01-20  5:22 ` jason at gcc dot gnu.org
2012-01-20 10:41 ` paolo.carlini at oracle dot com
2012-11-26 10:24 ` glisse at gcc dot gnu.org
2022-11-20 19:40 ` pinskia at gcc dot gnu.org
2022-11-20 20:17 ` zack+srcbugz at owlfolio dot org
2009-09-03  0:21 [Bug c++/41233] New: " zackw at panix dot com
2010-02-25 16:33 ` [Bug c++/41233] " jim at clkda dot com
2010-02-25 16:35 ` jim at clkda dot com
2010-02-25 20:02 ` jim at clkda dot com
2010-05-29  8:17 ` gcc at magfr dot user dot lysator dot liu dot se

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).