1#include <assert.h>
2
3// TODO we would like to #include "mathtest.h" here but this feature has been disabled in
4// the stage1 compiler. Users will have to wait until self-hosted is available for
5// the "generate .h file" feature.
6
7#include <stdint.h>
8int32_t add(int32_t a, int32_t b);
9
10#if _WIN32
11#define IMPORT __declspec(dllimport)
12#else
13#define IMPORT
14#endif
15
16extern IMPORT int32_t exported_var;
17
18int main(int argc, char **argv) {
19 assert(add(42, 1337) == 1379);
20 assert(exported_var == 9999);
21 return 0;
22}