public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/64912] New: no debug info for struct that pass by reference
@ 2015-02-03 3:59 chihin.ko at oracle dot com
0 siblings, 0 replies; only message in thread
From: chihin.ko at oracle dot com @ 2015-02-03 3:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64912
Bug ID: 64912
Summary: no debug info for struct that pass by reference
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: chihin.ko at oracle dot com
For following t.cc:
extern "C" int printf(const char*, ...);
#include <deque>
using namespace std;
deque<int> gl_li(5,100);
int main ()
{
deque<int> tmp_deque(5,200);
gl_li.assign(tmp_deque.cbegin(),tmp_deque.cend());
gl_li.assign(tmp_deque.begin(),tmp_deque.end());
for ( auto el: gl_li )
printf("el = %d\n", el);
return 0;
}
/gcc/4.8.1/intel-Linux/bin/g++ -m64 -std=c++11 t.cc -Xlinker
-R/gcc/4.8.1/intel-Linux/lib64
There is no debug info to indicate struct "_Deque_iterator<int, int&, int*>"
is passed type reference:
< 2><0x000009be> DW_TAG_structure_type
DW_AT_name "_Deque_iterator<int, int&,
int*>"
DW_AT_byte_size 0x00000020
DW_AT_decl_file 0x00000001
/net/dv104/export/tools/gcc/4.8.1/intel-Linux/include/c++/4.8.1/bits/stl_deque.h
DW_AT_decl_line 0x0000006a
DW_AT_sibling <0x00000c55>
< 3><0x000009ca> DW_TAG_member
DW_AT_name "_M_cur"
===============================================================================
Oracle C++ compiler would generate something like this:
< 2><0x00001bee> DW_TAG_structure_type
DW_AT_name "_Deque_iterator<int, int&,
int*>"
DW_AT_SUN_link_name
"_ZSt15_Deque_iteratorIiRiPiE"
DW_AT_decl_file 0x00000002
/ws/cia/builds/dodona/latest/inte
l-S2/lib/compilers/CC-gcc/include/c++/4.8.2/bits/stl_deque.h
DW_AT_decl_line 0x00000069
DW_AT_VMS_rtnbeg_pd_address <0x00001b9f>
DW_AT_byte_size 0x00000020
DW_AT_SUN_pass_with_const yes(1) <=== passed by
reference
DW_AT_SUN_return_with_const yes(1) <=== returned by
reference
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-03 3:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-03 3:59 [Bug c++/64912] New: no debug info for struct that pass by reference chihin.ko at oracle dot com
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).