1 ; RUN: llc -O0 < %s | FileCheck %s
2 ; Do not emit AT_upper_bound for an unbounded array.
4 define i32 @main() nounwind ssp {
6 %retval = alloca i32, align 4
7 %a = alloca [0 x i32], align 4
8 store i32 0, i32* %retval
9 call void @llvm.dbg.declare(metadata !{[0 x i32]* %a}, metadata !6), !dbg !11
13 declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone
17 !0 = metadata !{i32 589870, i32 0, metadata !1, metadata !"main", metadata !"main", metadata !"", metadata !1, i32 3, metadata !3, i1 false, i1 true, i32 0, i32 0, i32 0, i32 0, i1 false, i32 ()* @main, null} ; [ DW_TAG_subprogram ]
18 !1 = metadata !{i32 589865, metadata !"array.c", metadata !"/private/tmp", metadata !2} ; [ DW_TAG_file_type ]
19 !2 = metadata !{i32 589841, i32 0, i32 12, metadata !"array.c", metadata !"/private/tmp", metadata !"clang version 3.0 (trunk 129138)", i1 true, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
20 !3 = metadata !{i32 589845, metadata !1, metadata !"", metadata !1, i32 0, i64 0, i64 0, i32 0, i32 0, i32 0, metadata !4, i32 0, i32 0} ; [ DW_TAG_subroutine_type ]
21 !4 = metadata !{metadata !5}
22 !5 = metadata !{i32 589860, metadata !2, metadata !"int", null, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
23 !6 = metadata !{i32 590080, metadata !7, metadata !"a", metadata !1, i32 4, metadata !8, i32 0} ; [ DW_TAG_auto_variable ]
24 !7 = metadata !{i32 589835, metadata !0, i32 3, i32 12, metadata !1, i32 0} ; [ DW_TAG_lexical_block ]
25 !8 = metadata !{i32 589825, metadata !2, metadata !"", metadata !2, i32 0, i64 0, i64 32, i32 0, i32 0, metadata !5, metadata !9, i32 0, i32 0} ; [ DW_TAG_array_type ]
26 !9 = metadata !{metadata !10}
27 ;CHECK: DW_TAG_subrange_type
28 ;CHECK-NEXT: DW_AT_type
29 ;CHECK-NOT: DW_AT_lower_bound
30 ;CHECK-NOT: DW_AT_upper_bound
31 ;CHECK-NEXT: End Of Children Mark
32 !10 = metadata !{i32 589857, i64 1, i64 0} ; [ DW_TAG_subrange_type ]
33 !11 = metadata !{i32 4, i32 7, metadata !7, null}
34 !12 = metadata !{i32 5, i32 3, metadata !7, null}