xref: /aosp_15_r20/external/llvm/test/MC/COFF/linkonce-invalid.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker// Test invalid use of the .linkonce directive.
2*9880d681SAndroid Build Coastguard Worker//
3*9880d681SAndroid Build Coastguard Worker// RUN: not llvm-mc -triple i386-pc-win32 -filetype=obj %s 2>&1 | FileCheck %s
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Worker.section non_comdat
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker.section comdat
8*9880d681SAndroid Build Coastguard Worker.linkonce discard
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Worker.section assoc
11*9880d681SAndroid Build Coastguard Worker.linkonce associative comdat
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker.section invalid
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Worker// CHECK: error: unrecognized COMDAT type 'unknown'
17*9880d681SAndroid Build Coastguard Worker.linkonce unknown
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker// CHECK: error: unexpected token in directive
20*9880d681SAndroid Build Coastguard Worker.linkonce discard foo
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Worker// CHECK: error: cannot make section associative with .linkonce
23*9880d681SAndroid Build Coastguard Worker.linkonce associative
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Worker// CHECK: error: section 'multi' is already linkonce
26*9880d681SAndroid Build Coastguard Worker.section multi
27*9880d681SAndroid Build Coastguard Worker.linkonce discard
28*9880d681SAndroid Build Coastguard Worker.linkonce same_size
29