New submission from Paul Murphy:
This is a duplicate of Issue 23654, except it occurs on GCC 5.1 with -O2 when
building for a ppc64le target.
GCC is optimizes this as a tail call, removing the accesses to the "unused"
stack variables.
--
components: Extension Mod
Paul Murphy added the comment:
Somehow, you need to preserve access to the stack memory. The generated code is
still growing the stack, it just fails to touch any of it.
I'm guessing a volatile access would just add an extra non-stack access to the
infinite loop.
Initially, I had
Paul Murphy added the comment:
...
#pragma GCC optimize ("no-optimize-sibling-calls")
...
Does preserve the desired behavior under -O2 and -O3, probably a bit nicer than
using O0.
--
___
Python tracker
<http://bugs.python.o