quakeforge/tools/qfcc/test/ptrstructcast.r
Bill Currie ddc6f6bcb0 [qfcc] Un-dereference src expression early for movep
The VM has no pointer to direct reference move instruction.

Fixes #9
2021-06-30 20:05:27 +09:00

22 lines
273 B
R

typedef struct Point_s {
int x;
int y;
} Point;
typedef struct Extent_s {
int width;
int height;
} Extent;
int
foo (Point p)
{
Extent e = *(Extent *)&p;
return e.width * e.height;
}
int
main (void)
{
return foo ({ 6, 7 }) != 42;
}