mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +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;
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue