summaryrefslogtreecommitdiff
path: root/regress/libexec/ld.so/constructor/libab/ab.C
blob: 757502e5940a82699abfda3bc156fcef243fc667 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Public Domain 2003 Dale Rahn
 *
 * $OpenBSD: ab.C,v 1.4 2017/02/25 07:28:32 jsg Exp $
 */

#include <cstdlib>
#include <iostream>
#include "aa.h"
#include "ab.h"

using namespace std;

extern int a;

BB::BB(char *str)
{
	if (a == 0) {
		cout << "A not initialized in B constructors " << a << "\n";
		exit(1);
	}
}

BB ab("local");
AA aa("B");