Compiling this piece of code: c=================================================================== SUBROUTINE SETGRDREC (NMREC,ZREC,KK,Z,IREC) DIMENSION Z(KK) DIMENSION ZREC(NMREC,KK) i = 0 DO K=1,KK ZREC(IREC,I) = Z(I) ENDDO END c=================================================================== with the following command: gfortran -O2 -Wall -Wextra -ftree-vectorize -c bug.F -o bug.o results in: =================================================================== problem.F: In function 'setgrdrec': problem.F:1: error: Definition in block 2 does not dominate use in block 5 for SSA_NAME: TMT.7_31 in statement: # TMT.7_25 = V_MAY_DEF <TMT.7_31>; (*zrec_28)[D.821_23] = lsm_tmp.9_15; problem.F:1: internal compiler error: verify_ssa failed. =================================================================== It compiles without problems without -ftree-vectorize or -O1 or lower. output of gfortran -v: =================================================================== Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ./configure --prefix=/home/vici --enable-languages=f95 : (reconfigured) ./configure --prefix=/home/vici --enable-languages=f95 Thread model: posix gcc version 4.1.0 20050601 (experimental) =================================================================== Output of uname -a: Linux galadriel 2.6.11.4-20a-default #1 Wed Mar 23 21:52:37 UTC 2005 x86_64 x86_64 x86_64 GNU/Linux
I can reproduce this on powerpc-apple-darwin. Maybe a duplicate of PR21831. Hopefully will be resolved by Keith's work (http://gcc.gnu.org/ml/gcc-patches/2005-05/msg02478.html)
Confirmed based on Dorit's comment.
This testcase doesn't get vectorized anymore, after my patch from http://gcc.gnu.org/ml/gcc-patches/2005-05/msg02817.html: "pr21859.f90:6: note: not vectorized: redundant loop. no profit to vectorize. pr21859.f90:1: note: vectorized 0 loops in function." so it also doesn't ICE anymore. It might be that it's just avoiding the problem, but I also can't reproduce PR21831, which is a duplicate of this one, and which was not affected by my patch, so it might be that something else fixed the problem (don't know what).
This may be the same as PR 22228, which still fails as of today... W.
(In reply to comment #4) > This may be the same as PR 22228, which still fails as of today... I really doubt it because this only involves one loop and the other involves multiple loops.
Fixed.