NO

Author Topic: POCC 4.50.16 infinite loop  (Read 2881 times)

Svarog

  • Guest
POCC 4.50.16 infinite loop
« on: May 06, 2007, 07:42:55 AM »
The following code appears to send POCC into an infinite loop:

Code: [Select]
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

  • Guest
Re: POCC 4.50.16 infinite loop
« Reply #1 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

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: POCC 4.50.16 infinite loop
« Reply #2 on: May 06, 2007, 02:18:30 PM »
Also changing i to long long stops looping.
May the source be with you