[LLVMbugs] [Bug 23164] New: Nested static vars in same DWARF scope
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Apr 8 15:25:07 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=23164
Bug ID: 23164
Summary: Nested static vars in same DWARF scope
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Common Code Generator Code
Assignee: unassignedbugs at nondot.org
Reporter: paul_robinson at playstation.sony.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
If you have two static variables with the same name in nested lexical blocks:
int main() {
static float a = 50;
int b = a;
{
static int a = 200;
b += a;
}
return b;
}
You'll find that both DIEs for the two "a" variables are siblings.
<2><43>: Abbrev Number: 3 (DW_TAG_variable)
<44> DW_AT_name : (indirect string, offset: 0x54): a
<48> DW_AT_type : <0x7c>
<4c> DW_AT_decl_file : 1
<4d> DW_AT_decl_line : 2
<4e> DW_AT_location : 9 byte block: 3 0 0 0 0 0 0 0 0 (DW_OP_addr:
0)
<2><58>: Abbrev Number: 3 (DW_TAG_variable)
<59> DW_AT_name : (indirect string, offset: 0x54): a
<5d> DW_AT_type : <0x83>
<61> DW_AT_decl_file : 1
<62> DW_AT_decl_line : 5
<63> DW_AT_location : 9 byte block: 3 4 0 0 0 0 0 0 0 (DW_OP_addr:
4)
There's a lexical_block missing.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150408/3080628b/attachment.html>
More information about the llvm-bugs
mailing list