/tmp/gcc4/libexec/gcc/i686-pc-linux-gnu/4.0.0/cc1 -quiet test.c -quiet -dumpbase test.c -msse2 -auxbase test -O -ftree-vectorize -o test.s -version GNU C version 4.0.0 20041117 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.0.0 2004117 (experimental). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 test.c: In function 'foo': test.c:4: internal compiler error: in emit_move_insn, at expr.c:2590 Configured with: ../configure --prefix=/tmp/gcc4 --enable-shared --enable-languages=c --disable-nls --disable-libmudflap ======================================================== void foo(a, b) short a; short * b; { while (++a < 4) *b++ = 0; } ========================================================
Confirmed, the problem I think is the same as the PPC64 problem in PR 18403 but I did not check the patch which will fix that one for sure. Breakpoint 1, fancy_abort (file=0x81fcb4 "/Users/pinskia/src/apple-ppc-branch/gcc/gcc/expr.c", line=2485, function=0x81fe9c "emit_move_insn") at /Users/pinskia/src/apple-ppc-branch/gcc/gcc/ diagnostic.c:586 586 internal_error ("in %s, at %s:%d", function, trim_filename (file), line); (gdb) up #1 0x00337a2c in emit_move_insn (x=0x4178d7d0, y=0x417b1c48) at /Users/pinskia/src/apple- ppc-branch/gcc/gcc/expr.c:2485 2485 && (GET_MODE (y) == mode || GET_MODE (y) == VOIDmode)); (gdb) l 2480 enum machine_mode mode = GET_MODE (x); 2481 rtx y_cst = NULL_RTX; 2482 rtx last_insn, set; 2483 2484 gcc_assert (mode != BLKmode 2485 && (GET_MODE (y) == mode || GET_MODE (y) == VOIDmode)); 2486 2487 if (CONSTANT_P (y)) 2488 { 2489 if (optimize (gdb) p debug_rtx(x) (reg:SI 161 [ iters.6 ]) $1 = void (gdb) p debug_rtx(y) (subreg/s/u:HI (reg:SI 163 [ niters.1 ]) 2)
(In reply to comment #1) > Confirmed, the problem I think is the same as the PPC64 problem in PR 18403 but I did not check the > patch which will fix that one for sure. That patch does not fix this problem - this is a type mismatch in a different place than the one in PR18403. I have a fix for this problem - I'll send a patch shortly.
patch: http://gcc.gnu.org/ml/gcc-patches/2004-11/msg01512.html
Subject: Bug 18536 CVSROOT: /cvs/gcc Module name: gcc Changes by: dorit@gcc.gnu.org 2004-11-22 13:55:05 Modified files: gcc : ChangeLog tree-vectorizer.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.dg/vect: pr18536.c Log message: PR tree-opt/18536 * tree-vectorizer.c (make_loop_iterate_ntimes): Use type of niters when creating iv instead of integer_type. (vect_build_loop_niters): Remove redundant code. (vect_transform_loop_bound): Removed (duplicates functionality of make_loop_iterate_ntimes. (vect_gen_niters_for_prolog_loop): Add documentation. Call lang_hooks.types.type_for_size to create a type of the required size. Use that type instead of integer_type. Remove redundant code. (vect_update_niters_after_peeling): Use type of niters instead of integer_type. (vect_transform_loop): Unify handling of known and unknown loop bound cases. Call make_loop_iterate_ntimes instead of vect_transform_loop_bound. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6448&r2=2.6449 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-vectorizer.c.diff?cvsroot=gcc&r1=2.38&r2=2.39 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4627&r2=1.4628 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/vect/pr18536.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
Fixed.