summaryrefslogtreecommitdiff
path: root/6/main.c
diff options
context:
space:
mode:
Diffstat (limited to '6/main.c')
-rw-r--r--6/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/6/main.c b/6/main.c
index 5e3d6da..c980887 100644
--- a/6/main.c
+++ b/6/main.c
@@ -293,8 +293,12 @@ main(int argc, char **argv)
if (debugopt['T'])
dump(file, stdout);
loaduses();
- if (hasmain(file))
- geninit();
+ if (hasmain(file)) {
+ genautocall(file->file.init, file->file.ninit,
+ file->file.localinit, "__init__");
+ genautocall(file->file.fini, file->file.nfini,
+ file->file.localfini, "__fini__");
+ }
infer();
tagexports(0);
/* after all type inference */