fix Issue 9387 - Compiler switch -O changes behavior of correct code
Merge pull request #1584 from WalterBright/b45

fix Issue 9387 - Compiler switch -O changes behavior of correct code