10Sstevel@tonic-gate/* $OpenBSD: gd1.C,v 1.1 2007/09/03 14:42:44 millert Exp $ */ 20Sstevel@tonic-gate 33857Sstevel/* 43857Sstevel * Copyright (c) 2007 Kurt Miller <kurt@openbsd.org> 50Sstevel@tonic-gate * 60Sstevel@tonic-gate * Permission to use, copy, modify, and distribute this software for any 70Sstevel@tonic-gate * purpose with or without fee is hereby granted, provided that the above 80Sstevel@tonic-gate * copyright notice and this permission notice appear in all copies. 90Sstevel@tonic-gate * 100Sstevel@tonic-gate * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 110Sstevel@tonic-gate * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 120Sstevel@tonic-gate * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 130Sstevel@tonic-gate * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 140Sstevel@tonic-gate * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 150Sstevel@tonic-gate * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 160Sstevel@tonic-gate * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 170Sstevel@tonic-gate */ 180Sstevel@tonic-gate 190Sstevel@tonic-gate#include <stdio.h> 200Sstevel@tonic-gate 210Sstevel@tonic-gateextern int check1; 220Sstevel@tonic-gate 230Sstevel@tonic-gatestruct global_destructor_test_obj1 { 240Sstevel@tonic-gate inline ~global_destructor_test_obj1() { 250Sstevel@tonic-gate check1 = 0; 260Sstevel@tonic-gate } 270Sstevel@tonic-gate}; 280Sstevel@tonic-gate 290Sstevel@tonic-gateextern "C" void gd_test1() 300Sstevel@tonic-gate{ 310Sstevel@tonic-gate static global_destructor_test_obj1 gdt; 320Sstevel@tonic-gate} 330Sstevel@tonic-gate