Bug 24953 - [4.1/4.2 Regression] RTL check: access of elt 1 of vector with last elt 0 in vrsave_operation_1, at config/rs6000/predicates.md:1041
Summary: [4.1/4.2 Regression] RTL check: access of elt 1 of vector with last elt 0 in ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: 4.1.0
Assignee: David Edelsohn
URL:
Keywords: ice-checking, ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-11-20 09:22 UTC by Andreas Jaeger
Modified: 2006-01-01 21:05 UTC (History)
2 users (show)

See Also:
Host: powerpc64-linux-gnu
Target: powerpc64-linux-gnu
Build: powerpc64-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2005-11-21 02:09:57


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Jaeger 2005-11-20 09:22:16 UTC
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)
Comment 1 David Edelsohn 2005-11-21 02:09:57 UTC
We just need to check that we have enough elts in the VEC.
Comment 2 David Edelsohn 2005-11-21 02:54:01 UTC
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;
Comment 3 David Edelsohn 2005-11-21 16:12:35 UTC
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

Comment 4 David Edelsohn 2005-11-21 18:04:18 UTC
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

Comment 5 David Edelsohn 2005-11-21 18:52:44 UTC
Fixed.