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: [email protected]
Reporter: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs