https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96997
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2020-09-09 Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- Confirmed: $ gdb -quiet -ex start -ex n -ex l -ex where -ex n -ex l -ex where -ex n -ex l -ex where -ex cont -ex quit a.out Reading symbols from a.out... Temporary breakpoint 1 at 0x4011bf: file so.C, line 7. Starting program: /tmp/a.out Temporary breakpoint 1, main () at so.C:7 7 std::cout << std::string{"str1"}; 525 basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) 520 #if __cpp_deduction_guides && ! defined _GLIBCXX_DEFINING_STRING_INSTANTIATIONS 521 // _GLIBCXX_RESOLVE_LIB_DEFECTS 522 // 3076. basic_string CTAD ambiguity 523 template<typename = _RequireAllocator<_Alloc>> 524 #endif 525 basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) 526 : _M_dataplus(_M_local_data(), __a) 527 { _M_construct(__s, __s ? __s + traits_type::length(__s) : __s+npos); } 528 529 /** #0 main () at /usr/include/c++/10/bits/basic_string.h:525 8 std::cout << std::string{"str2"}; 3 4 5 int main() 6 { 7 std::cout << std::string{"str1"}; 8 std::cout << std::string{"str2"}; 9 return 0; 10 } 11 #0 main () at so.C:8 525 basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) 520 #if __cpp_deduction_guides && ! defined _GLIBCXX_DEFINING_STRING_INSTANTIATIONS 521 // _GLIBCXX_RESOLVE_LIB_DEFECTS 522 // 3076. basic_string CTAD ambiguity 523 template<typename = _RequireAllocator<_Alloc>> 524 #endif 525 basic_string(const _CharT* __s, const _Alloc& __a = _Alloc()) 526 : _M_dataplus(_M_local_data(), __a) 527 { _M_construct(__s, __s ? __s + traits_type::length(__s) : __s+npos); } 528 529 /** #0 main () at /usr/include/c++/10/bits/basic_string.h:525 Continuing. str1str2[Inferior 1 (process 2307959) exited normally] Although the current frame is still main() the current location is shown as the basic_string constructor.