Thanks so much for your help with this! My reading of the bug history is different than yours, it appears the patch wasn't committed and still appears in 5.3. Through some trial and error, I was able to work around the bug by making two of the arrays function local: void ScaleInputs(double* input, double minimum, double maximum, int size) { // SBW 2016.12.14 Fix for gcc error: : unable to find a register to spill in class 'POINTER_REGS // Make these arrays function local. Made const for good measure. const double max_input[InputCount] = { 1.20000000000000e+004, 3.21500000000000e+004, 3.24080000000000e+004, 1.89000000000000e+000, 2.01000000000000e+000, 1.20000000000000e-001, 1.00000000000000e+000, 1.19000000000000e+000, 2.26000000000000e+000, 5.15000000000000e+000 }; const double min_input[InputCount] = { 2.00000000000000e+003, 3.18210000000000e+004, 3.16850000000000e+004, 1.14000000000000e+000, 0.00000000000000e+000, -1.85000000000000e+000, -9.60000000000000e-001, -1.60000000000000e-001, 5.20000000000000e-001, -1.39000000000000e+000 }; for (long i=0; i<size; i++) { double delta = (maximum-minimum)/(max_input[i]-min_input[i]); input[i] = minimum - delta*min_input[i]+ delta*input[i]; } }
|