* g++.dg/debug/pr71432.C: Fail on AIX.
[official-gcc.git] / gcc / testsuite / g++.dg / asan / asan_globals_test.cc
blob38e71360b6aa98714b4b00feadc8ce205d096a0c
1 //===-- asan_globals_test.cc ----------------------------------------------===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // This file is a part of AddressSanitizer, an address sanity checker.
9 //
10 // Some globals in a separate file.
11 //===----------------------------------------------------------------------===//
12 #include "asan_test_utils.h"
14 char glob1[1];
15 char glob2[2];
16 char glob3[3];
17 char glob4[4];
18 char glob5[5];
19 char glob6[6];
20 char glob7[7];
21 char glob8[8];
22 char glob9[9];
23 char glob10[10];
24 char glob11[11];
25 char glob12[12];
26 char glob13[13];
27 char glob14[14];
28 char glob15[15];
29 char glob16[16];
30 char glob17[17];
31 char glob1000[1000];
32 char glob10000[10000];
33 char glob100000[100000];
35 static char static10[10];
37 int GlobalsTest(int zero) {
38 static char func_static15[15];
39 glob5[zero] = 0;
40 static10[zero] = 0;
41 func_static15[zero] = 0;
42 return glob5[1] + func_static15[2];