This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regex sets: fix Solaris optimiser bug (2nd attempt)
authorDavid Mitchell <davem@iabyn.com>
Fri, 18 Mar 2016 22:36:40 +0000 (22:36 +0000)
committerDavid Mitchell <davem@iabyn.com>
Fri, 18 Mar 2016 22:36:40 +0000 (22:36 +0000)
commit34f817bafdabdc84f560b8d590af294880f66e67
tree0db840a7fc5b48db6f93201a6130c8f79385accc
parentcc93400aa5a8d556c56c28a8de644bd178d050d4
regex sets: fix Solaris optimiser bug (2nd attempt)

[perl #127455]

My first fix for this, (v5.23.7-586-gd9cb841) didn't actually fix it.
The diagnosis was correct, but somewhere during fixing and testing I went
wrong, and the optimiser bug was still being triggered without me spotting
it.

The new approach, based on a suggestion by Tony C, is simply to
declare the errant local var 'fence' to be volatile. This stops the
compiler from optimising away its value.
regcomp.c