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 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;
}