Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / COFF / associative-comdat-empty.test
blob54768e20b441bb7374faac1297f07f2aad0730fe
1 # RUN: yaml2obj %s -o %t.obj
2 # RUN: not lld-link /include:symbol /dll /noentry /nodefaultlib %t.obj /out:%t.exe 2>&1 | FileCheck %s
4 # Tests an associative comdat being associated with an empty section errors.
5 # CHECK: lld-link: error: {{.*}}: associative comdat .text$ac1 (sec 1) has invalid reference to section .text$nm (sec 2)
6 # CHECK-NOT: lld-link: error:
8 --- !COFF
9 header:          
10   Machine:         IMAGE_FILE_MACHINE_AMD64
11   Characteristics: [  ]
12 sections:        
13   - Name:            '.text$ac1'
14     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
15     Alignment:       1
16     SectionData:     '01000000'
17   - Name:            '.text$nm'
18     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
19     Alignment:       1
20     SectionData:     '01000000'
21 symbols:         
22   - Name:            '.text$ac1'
23     Value:           0
24     SectionNumber:   1
25     SimpleType:      IMAGE_SYM_TYPE_NULL
26     ComplexType:     IMAGE_SYM_DTYPE_NULL
27     StorageClass:    IMAGE_SYM_CLASS_STATIC
28     SectionDefinition: 
29       Length:          4
30       NumberOfRelocations: 0
31       NumberOfLinenumbers: 0
32       CheckSum:        3099354981
33       Number:          2
34       Selection:       IMAGE_COMDAT_SELECT_ASSOCIATIVE
35   - Name:            '.text$nm'
36     Value:           0
37     SectionNumber:   2
38     SimpleType:      IMAGE_SYM_TYPE_NULL
39     ComplexType:     IMAGE_SYM_DTYPE_NULL
40     StorageClass:    IMAGE_SYM_CLASS_STATIC
41     SectionDefinition: 
42       Length:          0
43       NumberOfRelocations: 0
44       NumberOfLinenumbers: 0
45       CheckSum:        3099354981
46       Number:          4
47       Selection:       IMAGE_COMDAT_SELECT_ANY
48   - Name:            assocsym
49     Value:           0
50     SectionNumber:   1
51     SimpleType:      IMAGE_SYM_TYPE_NULL
52     ComplexType:     IMAGE_SYM_DTYPE_NULL
53     StorageClass:    IMAGE_SYM_CLASS_STATIC
54 ...