NO

Author Topic: fatal error: Internal error: 'Access violation' at 0x004e36eb  (Read 2663 times)

George99

  • Guest
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.

Code: [Select]
#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)
{
}

Offline Pelle

  • Administrator
  • Member
  • *****
  • Posts: 2266
    • http://www.smorgasbordet.com
Re: fatal error: Internal error: 'Access violation' at 0x004e36eb
« Reply #1 on: May 20, 2012, 01:51:33 PM »
I can reproduce it, and will look at it...
/Pelle