Optimization -frerun-cse-after-loop (included with -O2) was

causing render to crash on cygwin with gcc 3.4.4. Changed
declaration of shadepixel() argument "int facenr" to volatile.
Can anybody recommend a more elegant solution?
This commit is contained in:
Chris Want
2006-01-12 18:34:07 +00:00
parent 715794859a
commit cc2a332907

View File

@@ -2298,7 +2298,10 @@ void shade_material_loop(ShadeInput *shi, ShadeResult *shr)
/* x,y: window coordinate from 0 to rectx,y */
/* return pointer to rendered face */
void *shadepixel(float x, float y, int z, int facenr, int mask, float *col, float *rco)
/* note, facenr declared volatile due to over-eager -O2 optimizations
* on cygwin (particularly -frerun-cse-after-loop)
*/
void *shadepixel(float x, float y, int z, volatile int facenr, int mask, float *col, float *rco)
{
ShadeResult shr;
ShadeInput shi;