public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109020] New: Lambdas have different DWARF signature than the function they are in
@ 2023-03-04 10:09 jengelh at inai dot de
  2023-03-06  8:34 ` [Bug c++/109020] " rguenth at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: jengelh at inai dot de @ 2023-03-04 10:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109020
           Summary: Lambdas have different DWARF signature than the
                    function they are in
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jengelh at inai dot de
                CC: rguenther at suse dot de
  Target Milestone: ---

== Input ==

$ cat x.cpp
#include <stdint.h>
static void ff(uint64_t b) { [&](){}(); }
int main() { ff(0); }
$ g++ x.cpp -g
$ gdb a.out
(gdb) b ff<TAB><TAB>

== Observed ==

ff(uint64_t)
ff(unsigned long)::{lambda()#1}::operator()() const

== Expectation ==

ff(unsigned long)
ff(unsigned long)::{lambda()#1}::operator()() const

[or]

ff(uint64_t)
ff(uint64_t)::{lambda()#1}::operator()() const

== Additional info ==

I am filing this for gcc since I believe this might have to do with DWARF
generation rather than gdb being funky.

Using built-in specs.
COLLECT_GCC=g++-13
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/13/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64
--enable-languages=c,c++,objc,fortran,obj-c++,ada,go,d,jit,rust,m2
--enable-offload-targets=nvptx-none,amdgcn-amdhsa, --enable-offload-defaulted
--without-cuda-driver --enable-host-shared --enable-checking=release
--disable-werror --with-gxx-include-dir=/usr/include/c++/13
--with-libstdcxx-zoneinfo=/usr/share/zoneinfo --enable-ssp --disable-libssp
--disable-libvtv --enable-cet=auto --disable-libcc1 --enable-plugin
--with-bugurl=https://bugs.opensuse.org/ --with-pkgversion='SUSE Linux'
--with-slibdir=/lib64 --with-system-zlib --enable-libstdcxx-allocator=new
--disable-libstdcxx-pch --enable-libphobos
--enable-version-specific-runtime-libs --with-gcc-major-version-only
--enable-linker-build-id --enable-linux-futex --enable-gnu-indirect-function
--program-suffix=-13 --without-system-libunwind --enable-multilib
--with-arch-32=x86-64 --with-tune=generic
--with-build-config=bootstrap-lto-lean --enable-link-mutex
--build=x86_64-suse-linux --host=x86_64-suse-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.0.1 20230127 (experimental) [revision
ca8fb0096713a8477614ef874f16ba5bf16c48bc] (SUSE Linux)

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

* [Bug c++/109020] Lambdas have different DWARF signature than the function they are in
  2023-03-04 10:09 [Bug c++/109020] New: Lambdas have different DWARF signature than the function they are in jengelh at inai dot de
@ 2023-03-06  8:34 ` rguenth at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-03-06  8:34 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |MOVED

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Nothing in DWARF can change the scope name of a child DIE and I don't see
any mangled symbol name output either so it must be gdb being funky possibly
using the symbol demangling in one and the dwarf name in the other completion.

_ZZL2ffmENKUlvE_clEv

demangles as

ff(unsigned long)::{lambda()#1}::operator()() const

no typedefs in manglings, obviously.  Please file on the sourceware side.

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

end of thread, other threads:[~2023-03-06  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-04 10:09 [Bug c++/109020] New: Lambdas have different DWARF signature than the function they are in jengelh at inai dot de
2023-03-06  8:34 ` [Bug c++/109020] " rguenth at gcc dot gnu.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).