News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

POCC 4.50.16 infinite loop

Started by Svarog, May 06, 2007, 07:42:55 AM

Previous topic - Next topic

Svarog

The following code appears to send POCC into an infinite loop:


long long test( long long *ll )
{
    int i = 0;
    long long x;

    x = (ll[ i ]) | (ll[ i + 1 ]);
    ll[ i ] = ll[ i + 2 ];

    return( x );
}


I've let the compiler run for a few minutes and watched the memory usage go up to about 2GB in Task Manager before killing it.
This is about as far as I could narrow down the problem: changing long long to int fixes the problem. Also removing 6th or 7th line from the code also makes the problem go away.

Tested under Windows XP SP2, Intel Core 2 Duo with 2GB of RAM with POCC 4.50.16.

JohnF

Yes, I tried it in a few projects, in some it happens, others it doesn't.

John

TimoVJL

Also changing i to long long stops looping.
May the source be with you