xref: /llvm-project/llvm/test/MC/WebAssembly/data-symbol-in-text-section.ll (revision 270f63b84a612dfa438df3d59903bb76fa0c7740)
1; RUN: not --crash llc -filetype=obj %s -o /dev/null 2>&1 | FileCheck %s
2; CHECK: data symbols must live in a data section: data_symbol
3
4target triple = "wasm32-unknown-unknown"
5
6@data_symbol = constant [1024 x i32] zeroinitializer, section ".text", align 16
7
8define hidden i32 @main() local_unnamed_addr #0 {
9entry:
10  %0 = load i32, ptr getelementptr inbounds ([1024 x i32], ptr @data_symbol, i32 0, i32 10)
11  ret i32 %0
12}
13