quakeforge/tools/qfcc/test/temp-component.r
Bill Currie 218481764b [qfcc] Add failing test for temp.component
While it specifically checks vectors, I'm pretty sure it applies to
structs, too. Also, it's a little redundant with vecaddr.r, but is much
more specific and far less evil in what it does (no horrible pointer
shenanigans): just something that is fairly common practice.
2022-01-30 13:57:41 +09:00

13 lines
143 B
R

float
gety(vector v, vector z)
{
return (v + z).y;
}
int
main ()
{
vector a = [1, 2, 3];
vector b = [1, 2, 6];
return gety (a, b) != 4;
}