[Info-vax] yet another sys$qiow question
John Reagan
xyzzy1959 at gmail.com
Wed Aug 19 13:42:56 EDT 2015
On Wednesday, August 19, 2015 at 9:19:16 AM UTC-4, Simon Clubley wrote:
> It depends on what the optimiser does with an empty loop on a
> non-volatile variable and whether it just removes that loop completely.
>
> Although I don't write empty loops for non-volatile variables, gcc can
> (silently) optimise out other chunks of code that it thinks will never
> be reached or is otherwise redundant so I would have to consider the
> possibility that LLVM will do the same as well and that in some
> circumstances it might do it with empty non-volatile while loops as well.
>
Anytime you change code generators/optimizers, you run the risk of shaking loose broken programs. We saw lots of invalid programs from VAX that got wobbly on Alpha. We even saw it with various improvements we made to GEM over the years. Invalid programs have undefined behavior. You might like the current undefined behavior for years, but it is still undefined. Like uninitialized variables that appeared to be zero or false depending on some sequence of code that executed prior to you (ie, things the image activator may have left on the stack).
More information about the Info-vax
mailing list