Pelles C forum

Pelles C => Bug reports => Topic started by: fuerst on May 10, 2014, 06:42:06 PM

Title: Compiler bug, Pelles C V8.00 RC3 32-bit Fatal Internal error: splill_at_range()
Post by: fuerst on May 10, 2014, 06:42:06 PM
The following code does not compile and the compiler stops with a fatal error: Internal error: spill_at_range().

Found the original code at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3631.pdf (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3631.pdf) Page 2-3 and adopted it a little bit (correct Prototypes) and reduced as much as possible to the senseless code below. If you #undef ATOM then an (although senseless) program is generated.

#include <threads.h>
#include <stdio.h>
#define N 10000

long long old1;

#define ATOM
#ifdef ATOM
  #include <stdatomic.h>
  atomic_llong x = ATOMIC_VAR_INIT(0); 
#else
  long long x = 0;
#endif

static int do1( void *arg ) {
printf("prevent warning 2118 %p\n", arg);
  for (long long i1 = 1; i1 < N; ++i1) {
    old1 = x,
    x = i1; // spill_at_range()-error if ATOM is defined
  }
return 0;
}

int main( void )
{
   (void)do1(NULL);
    return 0;
}
Title: Re: Compiler bug, Pelles C V8.00 RC3 32-bit Fatal Internal error: splill_at_range()
Post by: Pelle on May 11, 2014, 12:32:01 PM
I will look at it.