Previously, the compiler would crash if e.g. the program passed a temporary value to a function taking a const reference. This change fixes ReferenceExpr::GetValue() to handle this case and allocate temporary storage for the temporary so that the pointer to that storage can be used for the reference value.
15 lines
291 B
Plaintext
15 lines
291 B
Plaintext
|
|
export uniform int width() { return programCount; }
|
|
|
|
|
|
int func(const int &a) { return a+1; }
|
|
int bar() { return 0; }
|
|
|
|
export void f_f(uniform float RET[], uniform float aFOO[]) {
|
|
RET[programIndex] = func(bar());
|
|
}
|
|
|
|
export void result(uniform float RET[]) {
|
|
RET[programIndex] = 1;
|
|
}
|