main を 2 度呼ぶ

ふとイヤなコードを思いつきました。

#include <stdio.h>
__attribute__((constructor)) int main() {
    static int i = 0;
    if (i) puts("world!");
    else i = puts("hello");
}

実行結果。

i@u ~/test> ./a.out
hello
world!
なにかあれば下記メールアドレスへ。
shinichiro.hamaji _at_ gmail.com
shinichiro.h