[OpenACC] Implement 'collapse' for combined constructs.
[llvm-project.git] / llvm / test / tools / llvm-locstats / locstats-bytes-overflow.yaml
blob692c9a114ac9497abaac9b40112ab4013264acae
1 # RUN: yaml2obj %s -o %t.o
2 # RUN: %llvm-locstats %t.o 2>&1 | FileCheck %s
3 # RUN: rm %t.o
5 ## Check that we are covering the situation when a stat field overflows.
6 ##
7 ## The yaml represents this DWARF:
8 ##
9 ## DW_TAG_compile_unit
10 ##   DW_AT_low_pc (0x0000000000000000)
11 ##   DW_AT_high_pc  (0x000000000000000b)
13 ##   DW_TAG_subprogram
14 ##     DW_AT_low_pc (0x0000000000000000)
15 ##     DW_AT_high_pc  (0xffffffffffffffff)
16 ##       DW_TAG_variable
17 ##         DW_AT_location (0x00000023:
18 ##            [0x0000000000000003, 0x0000000000000005): DW_OP_reg2 RCX)
19 ##   DW_TAG_subprogram
20 ##     DW_AT_low_pc    (0x0000000000000000)
21 ##     DW_AT_high_pc   (0xffffffffffffffff)
22 ##     DW_TAG_variable
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
29 --- !ELF
30 FileHeader:
31   Class:   ELFCLASS[[BITS=64]]
32   Data:    ELFDATA2LSB
33   Type:    ET_EXEC
34   Machine: EM_X86_64
35 Sections:
36   - Name:         .debug_loc
37     Type:         SHT_PROGBITS
38     AddressAlign: 0x01
39     Content:      '00000000000000000600000000000000010055000000000000000000000000000000000300000000000000050000000000000001005200000000000000000000000000000000'
40   - Name:         .debug_ranges
41     Type:         SHT_PROGBITS
42     AddressAlign: 0x01
43     Content:      '000000000000000003000000000000000500000000000000080000000000000000000000000000000000000000000000'
44 DWARF:
45   debug_abbrev:
46     - Table:
47       - Code:     1
48         Tag:      DW_TAG_compile_unit
49         Children: DW_CHILDREN_yes
50         Attributes:
51           - Attribute: DW_AT_low_pc
52             Form:      DW_FORM_addr
53           - Attribute: DW_AT_high_pc
54             Form:      DW_FORM_data8
55       - Code:     2
56         Tag:      DW_TAG_subprogram
57         Children: DW_CHILDREN_yes
58         Attributes:
59           - Attribute: DW_AT_low_pc
60             Form:      DW_FORM_addr
61           - Attribute: DW_AT_high_pc
62             Form:      DW_FORM_data8
63       - Code:     3
64         Tag:      DW_TAG_variable
65         Children: DW_CHILDREN_no
66         Attributes:
67           - Attribute: DW_AT_location
68             Form:      DW_FORM_sec_offset
69   debug_info:
70     - Version:    4
71       AbbrOffset: 0x00
72       Entries:
73         - AbbrCode: 1 ## DW_TAG_compile_unit
74           Values:
75             - Value: 0x00 ## DW_AT_low_pc
76             - Value: 0x0b ## DW_AT_high_pc
77         - AbbrCode: 2 ## DW_TAG_subprogram
78           Values:
79             - Value: 0x00 ## DW_AT_low_pc
80             - Value: 0xFFFFFFFFFFFFFFFF ## DW_AT_high_pc
81         - AbbrCode: 3 ## DW_TAG_variable
82           Values:
83             - Value: 0x23 ## DW_AT_sec_offset
84         - AbbrCode: 0 ## NULL
85         - AbbrCode: 2 ## DW_TAG_subprogram
86           Values:
87             - Value: 0x00 ## DW_AT_low_pc
88             - Value: 0xFFFFFFFFFFFFFFFF ## DW_AT_high_pc
89         - AbbrCode: 3 ## DW_TAG_variable
90           Values:
91             - Value: 0x23 ## DW_AT_sec_offset
92         - AbbrCode: 0 ## NULL
93         - AbbrCode: 0 ## NULL