1 # RUN: yaml2obj %s -o %t.o
2 # RUN: %llvm-locstats %t.o 2>&1 | FileCheck %s
5 ## Check that we are covering the situation when a stat field overflows.
7 ## The yaml represents this DWARF:
10 ## DW_AT_low_pc (0x0000000000000000)
11 ## DW_AT_high_pc (0x000000000000000b)
14 ## DW_AT_low_pc (0x0000000000000000)
15 ## DW_AT_high_pc (0xffffffffffffffff)
17 ## DW_AT_location (0x00000023:
18 ## [0x0000000000000003, 0x0000000000000005): DW_OP_reg2 RCX)
20 ## DW_AT_low_pc (0x0000000000000000)
21 ## DW_AT_high_pc (0xffffffffffffffff)
23 ## DW_AT_location (0x00000023:
24 ## [0x0000000000000003, 0x0000000000000005): DW_OP_reg2 RCX)
26 # CHECK: warning: "sum_all_variables(#bytes in parent scope)" field overflowed.
27 # CHECK: PC ranges covered: tainted
31 Class: ELFCLASS[[BITS=64]]
39 Content: '00000000000000000600000000000000010055000000000000000000000000000000000300000000000000050000000000000001005200000000000000000000000000000000'
43 Content: '000000000000000003000000000000000500000000000000080000000000000000000000000000000000000000000000'
48 Tag: DW_TAG_compile_unit
49 Children: DW_CHILDREN_yes
51 - Attribute: DW_AT_low_pc
53 - Attribute: DW_AT_high_pc
56 Tag: DW_TAG_subprogram
57 Children: DW_CHILDREN_yes
59 - Attribute: DW_AT_low_pc
61 - Attribute: DW_AT_high_pc
65 Children: DW_CHILDREN_no
67 - Attribute: DW_AT_location
68 Form: DW_FORM_sec_offset
73 - AbbrCode: 1 ## DW_TAG_compile_unit
75 - Value: 0x00 ## DW_AT_low_pc
76 - Value: 0x0b ## DW_AT_high_pc
77 - AbbrCode: 2 ## DW_TAG_subprogram
79 - Value: 0x00 ## DW_AT_low_pc
80 - Value: 0xFFFFFFFFFFFFFFFF ## DW_AT_high_pc
81 - AbbrCode: 3 ## DW_TAG_variable
83 - Value: 0x23 ## DW_AT_sec_offset
85 - AbbrCode: 2 ## DW_TAG_subprogram
87 - Value: 0x00 ## DW_AT_low_pc
88 - Value: 0xFFFFFFFFFFFFFFFF ## DW_AT_high_pc
89 - AbbrCode: 3 ## DW_TAG_variable
91 - Value: 0x23 ## DW_AT_sec_offset