Actually this file tuned out to be optimized by opt_level=2 (global optimization). The example source project is attached.
Anyway old version (6.1.16) worked Ok. The updated union P_->pattern is used later in the caller function. I always used unions to pack data; the same practics is used in hardware access structures/unions declared in TI headers. May be the optimization policy is changed? Now we see it dangerous to use this compiler.