Adding missing AddressOfExpr::GetLValueType()

This commit is contained in:
Dmitry Babokin
2014-12-30 18:11:39 +03:00
parent fb535fdfd0
commit da83196996
3 changed files with 38 additions and 0 deletions

24
tests/ref-10.ispc Normal file
View File

@@ -0,0 +1,24 @@
export uniform int width() { return programCount; }
struct Foo {
float a, b, c;
};
void foo(Foo &f, uniform int dim) {
(&f.a)[dim] += (&f.a)[dim];
}
export void f_fu(uniform float RET[], uniform float aFOO[], uniform float b) {
Foo f = { b, aFOO[programIndex], 1 };
if (programIndex < 2)
foo(f, 0);
RET[programIndex] = f.a + f.b + f.c;
}
export void result(uniform float RET[]) {
RET[programIndex] = 7+programIndex;
RET[0] = 12;
RET[1] = 13;
}