Pelles C forum

Pelles C => Bug reports => Topic started by: Svarog on May 06, 2007, 07:42:55 AM

Title: POCC 4.50.16 infinite loop
Post by: Svarog on May 06, 2007, 07:42:55 AM
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.
Title: Re: POCC 4.50.16 infinite loop
Post by: JohnF on May 06, 2007, 01:35:44 PM
Yes, I tried it in a few projects, in some it happens, others it doesn't.

John
Title: Re: POCC 4.50.16 infinite loop
Post by: TimoVJL on May 06, 2007, 02:18:30 PM
Also changing i to long long stops looping.