fix Issue 13237 Wrong code with -inline -O
Merge pull request #3848 from WalterBright/fix13237

fix Issue 13237 Wrong code with -inline -O