Reproducing the issue: * Compile the followoing code snippet with "clang++ -g var.cpp": int main() { for (int i = 0; i < 10; ++i) { int x[i + 1]; x[0]++; } } * Inspect the debug info for variable 'x' The relevant parts of the debug info: <4><6b>: Abbrev Number: 5 (DW_TAG_variable) <6c> DW_AT_location : 0x0 (location list) <70> DW_AT_name : (indirect string, offset: 0x71): x <74> DW_AT_decl_file : 1 <75> DW_AT_decl_line : 3 <76> DW_AT_type : <0x84> <1><84>: Abbrev Number: 7 (DW_TAG_array_type) <85> DW_AT_type : <0x7d> <2><89>: Abbrev Number: 8 (DW_TAG_subrange_type) <8a> DW_AT_type : <0x8f> <2><8e>: Abbrev Number: 0 <1><8f>: Abbrev Number: 9 (DW_TAG_base_type) <90> DW_AT_name : (indirect string, offset: 0x73): sizetype <94> DW_AT_byte_size : 8 <95> DW_AT_encoding : 7 (unsigned) <1><96>: Abbrev Number: 0 The problem is that clang specifies a DW_TAG_subrange_type under DW_TAG_array_type but is fails to fill it in with some information specifying the number of elements in the array (DW_AT_count or DW_AT_upper_bound). The issue is reproduced with clang 3.5.0 and with 3.8.0 (trunk 256170). Gcc 4.8.4 generates correct debug info with producing a DW_AT_upper_bound containing a dwarf expression to a memory location containing the current array size.