mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 07:11:41 +00:00
Add failing global init test too
This commit is contained in:
parent
4caa875442
commit
3257e7145b
1 changed files with 6 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
int a;
|
int a;
|
||||||
double b;
|
double b;
|
||||||
int c;
|
int c = (int) &b;
|
||||||
double d;
|
double d;
|
||||||
void printf (string fmt, ...) = #0;
|
void printf (string fmt, ...) = #0;
|
||||||
|
|
||||||
|
@ -9,8 +9,12 @@ int main()
|
||||||
int di = (int) &d;
|
int di = (int) &d;
|
||||||
int fail = 0;
|
int fail = 0;
|
||||||
|
|
||||||
|
if (!c) {
|
||||||
|
printf ("global init address cast fail: %d\n", c);
|
||||||
|
fail |= 1;
|
||||||
|
}
|
||||||
if (!di) {
|
if (!di) {
|
||||||
printf ("address cast fail: %d\n", di);
|
printf ("local init address cast fail: %d\n", di);
|
||||||
fail |= 1;
|
fail |= 1;
|
||||||
}
|
}
|
||||||
return fail;
|
return fail;
|
||||||
|
|
Loading…
Reference in a new issue