summaryrefslogtreecommitdiff
path: root/regress/lib/csu/ctors/ctors.c
blob: e5c04b6c8d0a253e10fa10dab6bf27f28d02ef8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*	$OpenBSD: ctors.c,v 1.3 2003/07/31 21:48:02 deraadt Exp $	*/
/*
 *	Written by Artur Grabowski <art@openbsd.org>, 2002 Public Domain.
 */
void foo(void) __attribute__((constructor));

int constructed = 0;

void
foo(void)
{
	constructed = 1;
}

int
main(int argc, char *argv[])
{
	return !constructed;
}