Clean up some minor white space issues in trans-decl.c and trans-expr.c
[official-gcc.git] / gcc / testsuite / g++.dg / asan / dlclose-test-1-so.cc
blob99f00e2300745b04615fb5ec0c1f727de430bfa7
1 //===----------- dlclose-test-so.cc -----------------------------*- C++ -*-===//
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 // Regression test for
11 // http://code.google.com/p/address-sanitizer/issues/detail?id=19
12 //===----------------------------------------------------------------------===//
14 #include <stdio.h>
16 static int pad1;
17 static int static_var;
18 static int pad2;
20 extern "C"
21 int *get_address_of_static_var() {
22 return &static_var;
25 __attribute__((constructor))
26 void at_dlopen() {
27 printf("%s: I am being dlopened\n", __FILE__);
29 __attribute__((destructor))
30 void at_dlclose() {
31 printf("%s: I am being dlclosed\n", __FILE__);