quakeforge/tools/qfcc/test/address-cast.r

22 lines
324 B
R
Raw Normal View History

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