Running the GCC testsuite I see the following ICE: Executing on host: /abuild/aj/gcc/gcc/xgcc -B/abuild/aj/gcc/gcc/ /aj-cvs/gcc-svn/branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/vmx/gcc-bug-b.c -O1 -m altivec -mabi=altivec -std=gnu99 -fno-show-column -S -m64 -o gcc-bug-b.s (timeout = 300) /aj-cvs/gcc-svn/branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/vmx/gcc-bug-b.c: In function 'test': /aj-cvs/gcc-svn/branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/vmx/gcc-bug-b.c:23: internal compiler error: RTL check: access of elt 1 of vector with las t elt 0 in vrsave_operation_1, at config/rs6000/predicates.md:1041 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. compiler exited with status 1 output is: /aj-cvs/gcc-svn/branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/vmx/gcc-bug-b.c: In function 'test': /aj-cvs/gcc-svn/branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/vmx/gcc-bug-b.c:23: internal compiler error: RTL check: access of elt 1 of vector with las t elt 0 in vrsave_operation_1, at config/rs6000/predicates.md:1041 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. FAIL: gcc.dg/vmx/gcc-bug-b.c -O1 (test for excess errors) Compiler is: /opt/gcc/4.1-devel/bin/gcc -v Using built-in specs. Target: powerpc64-suse-linux-gnu Configured with: /aj-cvs/gcc-svn/branches/gcc-4_1-branch/configure --prefix=/opt/gcc/4.1-devel --enable-checking=misc,tree,gc,rtl,rtlflag,assert --enable-threads=posix --enable-clocale=gnu --enable-__cxa_atexit --enable-shared --enable-languages=c,c++,treelang,java,f95,objc --with-system-zlib --with-cpu=default32 powerpc64-suse-linux-gnu Thread model: posix gcc version 4.1.0 20051119 (prerelease)
We just need to check that we have enough elts in the VEC.
Index: predicates.md =================================================================== I think the following patch fixes the checking failure. I will bootstrap overnight. --- predicates.md (revision 107244) +++ predicates.md (working copy) @@ -1034,7 +1034,8 @@ if (count <= 1 || GET_CODE (XVECEXP (op, 0, 0)) != SET || GET_CODE (SET_DEST (XVECEXP (op, 0, 0))) != REG - || GET_CODE (SET_SRC (XVECEXP (op, 0, 0))) != UNSPEC_VOLATILE) + || GET_CODE (SET_SRC (XVECEXP (op, 0, 0))) != UNSPEC_VOLATILE + || XVECLEN (SET_SRC (XVECEXP (op, 0, 0)), 0) <= 1) return 0;
Subject: Bug 24953 Author: dje Date: Mon Nov 21 16:12:32 2005 New Revision: 107311 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107311 Log: PR target/24953 * config/rs6000/predicates.md (vrsave_operation): Check UNSPEC_VOLATILE value. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/predicates.md
Subject: Bug 24953 Author: dje Date: Mon Nov 21 18:04:14 2005 New Revision: 107314 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107314 Log: PR target/24953 * config/rs6000/predicates.md (vrsave_operation): Check UNSPEC_VOLATILE value. Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/config/rs6000/predicates.md
Fixed.