Line number bug (not shared nodes related)
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=2726
Reported by Martin Stjernholm mast@roxen.com
In this program, Pike reports the error on the line indicated with the comment:
mixed foo;
array bar = ({});
int main()
{
int i = 1;
if (i) {
foo = bar[i];
}
} // Attempt to index the empty array with 1.
The problem is the same whether or not shared nodes are enabled. It's interesting that the problem disappears if the variable i isn't function local, or if bar is replaced by a literal ({}) but not if it's made constant.
The problem does not exist in 7.2 and earlier. Tested in a Pike compiled without machine code.