Bug 12292

Summary: internal compiler error: RTL check: expected code `const_int', have `reg' in make_field_assignment, at combine.c:7815
Product: gcc Reporter: marky
Component: rtl-optimizationAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs
Priority: P2    
Version: 3.3.1   
Target Milestone: 3.3.3   
Host: x86_64-suse-linux-gnu Target: x86_64-suse-linux-gnu
Build: x86_64-suse-linux-gnu Known to work:
Known to fail: Last reconfirmed:
Attachments: small test case

Description marky 2003-09-15 20:36:22 UTC
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
Comment 1 marky 2003-09-16 23:00:30 UTC
Created attachment 4773 [details]
small test case

This reduced test case provokes the same internal compiler error.