This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/46292] FAIL: gcc.c-torture/execute/vector-shift2.c compilation, -O3 -g
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 3 Nov 2010 19:11:40 +0000
- Subject: [Bug middle-end/46292] FAIL: gcc.c-torture/execute/vector-shift2.c compilation, -O3 -g
- Auto-submitted: auto-generated
- References: <bug-46292-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46292
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2010.11.03 19:11:31
AssignedTo|unassigned at gcc dot |ubizjak at gmail dot com
|gnu.org |
Target Milestone|--- |4.6.0
Ever Confirmed|0 |1
--- Comment #4 from Uros Bizjak <ubizjak at gmail dot com> 2010-11-03 19:11:31 UTC ---
(In reply to comment #1)
> > at ../../gcc/gcc/lower-subreg.c:416
> > 416 gcc_assert (VECTOR_MODE_P (innermode));
> > (gdb) p innermode
> > $1 = TImode
>
> What happens if you just remove the assert?
Ok, it will break further in the compilation.
But following patch will work (tested with the hppa cross):
--cut here--
Index: lower-subreg.c
===================================================================
--- lower-subreg.c (revision 166266)
+++ lower-subreg.c (working copy)
@@ -411,10 +411,13 @@ simplify_subreg_concatn (enum machine_mo
part = XVECEXP (op, 0, byte / inner_size);
partmode = GET_MODE (part);
+ if (partmode == VOIDmode && VECTOR_MODE_P (innermode))
+ partmode = GET_MODE_INNER (innermode);
+
if (partmode == VOIDmode)
{
- gcc_assert (VECTOR_MODE_P (innermode));
- partmode = GET_MODE_INNER (innermode);
+ enum mode_class mclass = GET_MODE_CLASS (innermode);
+ partmode = mode_for_size (inner_size * BITS_PER_UNIT, mclass, 0);
}
final_offset = byte % inner_size;
--cut here--
Dave, can you please regression test this patch?