Disable gfortran stack-reuse compiler option (#595)
Disable gfortran stack-reuse compiler option (#595)

* Disable stack-reuse in gfortran

Ran into an issue with gfortran 9.1.0 on mac where a function within a subroutine used the same stack location for an integer as a variable of a different name in the subroutine.

See commit c35dc09b of the structural control revision for problematic code.  The basic issue was that the ErrStat value of subroutine ParseInputFileInfo was sharing stack space with the CurLine variable.  The function 'Failed' would check the ErrStat2 value and set the ErrStat accordingly, but in optimization -O2 or -O3, the CurLine variable and ErrStat variable were the same stack location, resulting in very strange behaviour.  In this particular case, it caused OpenFAST to abort.  Gfortran 7.x and debug compiles do not show this issue.

 Based on the documentation in section 3.16 from https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc.pdf, this may sometimes occur with legacy code and it is possible we've had this happen in the past and never known about it.  Impact on memory usage is unknown at this time.

* Add link to bug description in PR

Co-authored-by: Rafael M Mudafort <70fe8fcd98d06b6d274772a08e56b6bf4b09fa34@gmail.com>
OpenFAST/OpenFAST,OpenFAST/OpenFAST,OpenFAST/OpenFAST