Looking at the pointer values passed and assigned and the resultStackIdx, I see that the sequence of assignments is correct. First: args = arrayList(args, FALSE) second: *(++resultStackIdx) = args
But incrementing resultStackIdx only works the first time, the second time entering the apply statement, resultStackIdx doesn’t increment and is stuck at its old value forever, no matter how often I enter the apply statement. Now the old pointer is overwritten again and again and has never a chance to get processed by popResult() higher up in evaluateExpression() for freeing cells and memory.
So it seems not to be a sequence point problem, but a problem with the ++ operator in gcc but only under certain circumstances.
Googling for: problem with ++ operator in gcc , I get a few links about this.
Ps: my name appearing in red color is a bug in the forum configuration and Ryon is trying to chase it down.