gcc 3.3.1 internal compiler error on the following short test case. % gcc -c bug.c -O bug.c: In function `bug': bug.c:35: internal compiler error: RTL check: expected code `const_int', have `reg' in make_field_assignment, at combine.c:7815 --- bug.c --- typedef struct { char flags; } rec; extern char vec[10]; int bug(rec *c) { char *p = 0; int v, t, f; for (;;) { switch (*p++) { case 0: t = *p++; f = *p++; v = vec[*p++]; if (v == 1) { if (f) c->flags |= (1 << t); } else { if (!f) c->flags &= ~(1 << t); } break; case 1: v = vec[*p++]; break; case 2: ((void) ((p == 0) ? 0 : (__assert_fail ("p == 0", "bug.c", 31, __PRETTY_FUNCTION__), 0))); break; } } return 0; } --- end bug.c --- gcc build configuration: configure --prefix=/usr/local --host=x86_64-suse-linux-gnu --disable-nls --enable-threads=posix --enable-clocale=gnu --enable-__cxa_atexit --enable-shared --enable-languages=c,c++,f77,objc,treelang,java,f77 --enable-checking=misc,tree,rtl,gc,rtlflag --with-system-zlib
Created attachment 4773 [details] small test case This reduced test case provokes the same internal compiler error.
http://gcc.gnu.org/ml/gcc-patches/2003-10/msg00143.html