I set the Makefile rule for stacks-native to use -O0 -fno-optimize-sibling-calls, but testd0opt still segfaults. I also tried with only -O0.

My GCC version is 4.7.1; architecture is amd64.

Checking output with -S, "push_stack_fragment_really" is not inlined. Is there anything I can check/report?


On Fri, Oct 19, 2012 at 4:35 AM, Gabriel Kerneis <kerneis@pps.jussieu.fr> wrote:
On Fri, Oct 19, 2012 at 02:20:56AM -0000, oleg@okmij.org wrote:
> I'll see if I could find a pragma or other way to disable undesirable
> optimizations.

No tested, but you could try -fno-optimize-sibling-calls:
$ gcc --help=optimizers|grep "tail recursive"
  -foptimize-sibling-calls    Optimize sibling and tail recursive calls

Best,
--
Gabriel