[Clang][SME2] Enable multi-vector loads & stores for SME2 (#75821)
[llvm-project.git] / compiler-rt / lib / asan / tests / asan_globals_test.cpp
blob660a14a3110ab840d06705bc9600065fbb40ea3d
1 //===-- asan_globals_test.cpp ---------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file is a part of AddressSanitizer, an address sanity checker.
11 // Some globals in a separate file.
12 //===----------------------------------------------------------------------===//
13 #include "asan_test_utils.h"
15 char glob1[1];
16 char glob2[2];
17 char glob3[3];
18 char glob4[4];
19 char glob5[5];
20 char glob6[6];
21 char glob7[7];
22 char glob8[8];
23 char glob9[9];
24 char glob10[10];
25 char glob11[11];
26 char glob12[12];
27 char glob13[13];
28 char glob14[14];
29 char glob15[15];
30 char glob16[16];
31 char glob17[17];
32 char glob1000[1000];
33 char glob10000[10000];
34 char glob100000[100000];
36 static char static10[10];
38 int GlobalsTest(int zero) {
39 static char func_static15[15];
40 glob5[zero] = 0;
41 static10[zero] = 0;
42 func_static15[zero] = 0;
43 return glob5[1] + func_static15[2];