Pelles C forum

Pelles C => Bug reports => Topic started by: George99 on May 17, 2012, 05:54:32 PM

Title: fatal error: Internal error: 'Access violation' at 0x004e36eb
Post by: George99 on May 17, 2012, 05:54:32 PM
This little masterpiece of code ;) works fine while NUMBER is set to any value but 3, which leads to the internal error. As I understand this is an error regarding the internal handling of the "goto"-statement.
The error does not appear without optimization set.
Don't worry of what this function really does. I simplified it as far as posible without losing the error-message so it seems to be non-sense now.

#define NUMBER 3

int test(int *array)
{
for (int k = 2; k < NUMBER; k++) {
if (!(NUMBER % k)) {
for (int i = 0; i < k; i++)
if (array[i])
goto continue_k;
return 0;
}
  continue_k:;
}
return -1;
}

int main(void)
{
}
Title: Re: fatal error: Internal error: 'Access violation' at 0x004e36eb
Post by: Pelle on May 20, 2012, 01:51:33 PM
I can reproduce it, and will look at it...