COMP: My compiler's optimizer was miscompiling the code so that it would give incorrect results under rare but repeatable circumstances, but if I even added a single "fprintf" then everything started working.  So, I rearranged things a bit until it worked.  The compiler was gcc-4.2.4-1ubuntu4 64-bit -O2 on ubuntu hardy.  Other compilers that I tried had no problem with the code.
COMP: My compiler's optimizer was miscompiling the code so that it would give incorrect results under rare but repeatable circumstances, but if I even added a single "fprintf" then everything started working.  So, I rearranged things a bit until it worked.  The compiler was gcc-4.2.4-1ubuntu4 64-bit -O2 on ubuntu hardy.  Other compilers that I tried had no problem with the code.

sumedhasingla/VTK,demarle/VTK,hendradarwin/VTK,naucoin/VTKSlicerWidgets,keithroe/vtkoptix,msmolens/VTK,Wuteyan/VTK,candy7393/VTK,demarle/VTK,berendkleinhaneveld/VTK,mspark93/VTK,collects/VTK,arnaudgelas/VTK,jmerkow/VTK,jeffbaumes/jeffbaumes-vtk,arnaudgelas/VTK,sumedhasingla/VTK,demarle/VTK,biddisco/VTK,cjh1/VTK,SimVascular/VTK,jeffbaumes/jeffbaumes-vtk,cjh1/VTK,demarle/VTK,berendkleinhaneveld/VTK,ashray/VTK-EVM,cjh1/VTK,SimVascular/VTK,candy7393/VTK,demarle/VTK,sumedhasingla/VTK,ashray/VTK-EVM,keithroe/vtkoptix,collects/VTK,hendradarwin/VTK,Wuteyan/VTK,sumedhasingla/VTK,aashish24/VTK-old,collects/VTK,berendkleinhaneveld/VTK,gram526/VTK,jmerkow/VTK,hendradarwin/VTK,sankhesh/VTK,sankhesh/VTK,johnkit/vtk-dev,johnkit/vtk-dev,gram526/VTK,sumedhasingla/VTK,candy7393/VTK,ashray/VTK-EVM,johnkit/vtk-dev,biddisco/VTK,mspark93/VTK,jeffbaumes/jeffbaumes-vtk,berendkleinhaneveld/VTK,msmolens/VTK,berendkleinhaneveld/VTK,keithroe/vtkoptix,aashish24/VTK-old,Wuteyan/VTK,arnaudgelas/VTK,daviddoria/PointGraphsPhase1,spthaolt/VTK,candy7393/VTK,hendradarwin/VTK,demarle/VTK,aashish24/VTK-old,mspark93/VTK,collects/VTK,daviddoria/PointGraphsPhase1,Wuteyan/VTK,johnkit/vtk-dev,hendradarwin/VTK,arnaudgelas/VTK,ashray/VTK-EVM,SimVascular/VTK,naucoin/VTKSlicerWidgets,ashray/VTK-EVM,sankhesh/VTK,msmolens/VTK,biddisco/VTK,sankhesh/VTK,SimVascular/VTK,biddisco/VTK,collects/VTK,gram526/VTK,keithroe/vtkoptix,jmerkow/VTK,msmolens/VTK,aashish24/VTK-old,berendkleinhaneveld/VTK,naucoin/VTKSlicerWidgets,jmerkow/VTK,jeffbaumes/jeffbaumes-vtk,biddisco/VTK,naucoin/VTKSlicerWidgets,mspark93/VTK,SimVascular/VTK,berendkleinhaneveld/VTK,aashish24/VTK-old,gram526/VTK,sankhesh/VTK,keithroe/vtkoptix,daviddoria/PointGraphsPhase1,SimVascular/VTK,ashray/VTK-EVM,cjh1/VTK,jmerkow/VTK,aashish24/VTK-old,arnaudgelas/VTK,daviddoria/PointGraphsPhase1,spthaolt/VTK,Wuteyan/VTK,jmerkow/VTK,naucoin/VTKSlicerWidgets,jmerkow/VTK,candy7393/VTK,hendradarwin/VTK,msmolens/VTK,biddisco/VTK,keithroe/vtkoptix,SimVascular/VTK,SimVascular/VTK,sumedhasingla/VTK,johnkit/vtk-dev,cjh1/VTK,Wuteyan/VTK,biddisco/VTK,naucoin/VTKSlicerWidgets,jmerkow/VTK,keithroe/vtkoptix,candy7393/VTK,gram526/VTK,ashray/VTK-EVM,candy7393/VTK,jeffbaumes/jeffbaumes-vtk,spthaolt/VTK,spthaolt/VTK,mspark93/VTK,gram526/VTK,daviddoria/PointGraphsPhase1,mspark93/VTK,spthaolt/VTK,candy7393/VTK,msmolens/VTK,Wuteyan/VTK,sankhesh/VTK,johnkit/vtk-dev,gram526/VTK,msmolens/VTK,demarle/VTK,hendradarwin/VTK,demarle/VTK,spthaolt/VTK,spthaolt/VTK,mspark93/VTK,sumedhasingla/VTK,arnaudgelas/VTK,sumedhasingla/VTK,collects/VTK,daviddoria/PointGraphsPhase1,msmolens/VTK,mspark93/VTK,cjh1/VTK,ashray/VTK-EVM,keithroe/vtkoptix,johnkit/vtk-dev,sankhesh/VTK,jeffbaumes/jeffbaumes-vtk,gram526/VTK,sankhesh/VTK