summaryrefslogtreecommitdiff
path: root/src/regress/lib/libc/cxa-atexit/libgd1/gd1.C
diff options
context:
space:
mode:
Diffstat (limited to 'src/regress/lib/libc/cxa-atexit/libgd1/gd1.C')
-rw-r--r--src/regress/lib/libc/cxa-atexit/libgd1/gd1.C32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/regress/lib/libc/cxa-atexit/libgd1/gd1.C b/src/regress/lib/libc/cxa-atexit/libgd1/gd1.C
new file mode 100644
index 0000000000..b3ecd56d91
--- /dev/null
+++ b/src/regress/lib/libc/cxa-atexit/libgd1/gd1.C
@@ -0,0 +1,32 @@
1/* $OpenBSD: gd1.C,v 1.1 2007/09/03 14:42:44 millert Exp $ */
2
3/*
4 * Copyright (c) 2007 Kurt Miller <kurt@openbsd.org>
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19#include <stdio.h>
20
21extern int check1;
22
23struct global_destructor_test_obj1 {
24 inline ~global_destructor_test_obj1() {
25 check1 = 0;
26 }
27};
28
29extern "C" void gd_test1()
30{
31 static global_destructor_test_obj1 gdt;
32}