]> git.proxmox.com Git - rustc.git/blame - src/compiler-rt/test/asan/TestCases/SharedLibs/shared-lib-test-so.cc
Imported Upstream version 1.5.0+dfsg1
[rustc.git] / src / compiler-rt / test / asan / TestCases / SharedLibs / shared-lib-test-so.cc
CommitLineData
1a4d82fc
JJ
1//===----------- shared-lib-test-so.cc --------------------------*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file is a part of AddressSanitizer, an address sanity checker.
11//
12//===----------------------------------------------------------------------===//
13#include <stdio.h>
14#include <string.h>
15
16int pad[10];
17int GLOB[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
18
19extern "C"
20void inc(int index) {
21 GLOB[index]++;
22}
23
24extern "C"
25void inc2(int *a, int index) {
26 a[index]++;
27}