From Bugzilla Helper: User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.17-xfs i586) Description of problem: Interleaved assignment statements and do_div operations on unsigned long long variables followed by a function call that uses those variables breaks gcc 2.96 20000731 (Red Hat Linux 7.1 2.96-98) with an Unrecognizable insn. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Create gcc_bug.c containing #include <asm/div64.h> void gcc_bug(unsigned long long *len_p) { unsigned long long bno; unsigned long long len; bno = 2000; do_div(bno, 12); len = *len_p; do_div(len, 24); printf("%lld %lld\n", bno, len); } 2. gcc -O2 -c gcc_bug.c 3. Actual Results: gcc_bug.c: In function `gcc_bug': gcc_bug.c:13: Unrecognizable insn: (insn 49 153 147 (parallel[ (set (reg:SI 0 eax) (asm_operands ("") ("=a") 0[ (reg:DI 1 edx) ] [ (asm_input:DI ("A")) ] ("gcc_bug.c") 11)) (set (reg:SI 1 edx) (asm_operands ("") ("=d") 1[ (reg:DI 1 edx) ] [ (asm_input:DI ("A")) ] ("gcc_bug.c") 11)) (clobber (reg:QI 19 dirflag)) (clobber (reg:QI 18 fpsr)) (clobber (reg:QI 17 flags)) ] ) -1 (insn_list 45 (nil)) (nil)) gcc_bug.c:13: confused by earlier errors, bailing out Expected Results: Clean compile. Additional info: Doing both the assignments before the calls to do_div makes the problem disappear. Doing two calls to printf with one variable on each call makes the problem disappear. Assigning len from a constant instead of from a parameter makes the problem disappear. Passing len directly instead of via a pointer makes the problem disappear. Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-81)
Ok with gcc 3.2