https://bugs.llvm.org/show_bug.cgi?id=48667
Bug ID: 48667
Summary: Incorrect DWARF at -O3 for function inside struct
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected],
[email protected]
Created attachment 24353
--> https://bugs.llvm.org/attachment.cgi?id=24353&action=edit
test file to reproduce issue
If I compile the small attached test case (reduced from real code) with -g -O3,
I get a DW_TAG_subprogram die with no attributes in it:
$ clang++ -g -c -O3 ctor-test.cc
$ dwarfdump ctor-test.o
(Note the DIE at 0x46):
...
0x00000041: DW_TAG_pointer_type
DW_AT_type (0x0000002a "foo")
0x00000046: DW_TAG_subprogram
0x00000047: DW_TAG_class_type
DW_AT_calling_convention (DW_CC_pass_by_value)
DW_AT_byte_size (0x01)
DW_AT_decl_file
("/usr/local/google/home/cmtice/ctor-test.cc")
DW_AT_decl_line (3)
0x0000004c: DW_TAG_subprogram
DW_AT_name ("operator()")
DW_AT_decl_file
("/usr/local/google/home/cmtice/ctor-test.cc")
DW_AT_decl_line (3)
DW_AT_type (0x00000060 "auto")
DW_AT_declaration (true)
DW_AT_external (true)
DW_AT_accessibility (DW_ACCESS_public)
...
I'm attaching the test file and the dwarfdump I got.
$ cat ctor-test.cc
void f1();
struct foo { foo() { []{ f1(); }(); } };
int main() { foo f; }
$
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs