Add failing global init test too

This commit is contained in:
Bill Currie 2020-02-15 10:12:33 +09:00
parent 4caa875442
commit 3257e7145b

View file

@ -1,6 +1,6 @@
int a;
double b;
int c;
int c = (int) &b;
double d;
void printf (string fmt, ...) = #0;
@ -9,8 +9,12 @@ int main()
int di = (int) &d;
int fail = 0;
if (!c) {
printf ("global init address cast fail: %d\n", c);
fail |= 1;
}
if (!di) {
printf ("address cast fail: %d\n", di);
printf ("local init address cast fail: %d\n", di);
fail |= 1;
}
return fail;