This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PING: PATCH: middle-end/36701: [4.4 Regression] unaligned access in gcc.c-torture/execute/complex-7.c
On Fri, Aug 15, 2008 at 04:37:03PM -0700, Andrew Pinski wrote:
> On Fri, Aug 15, 2008 at 3:56 PM, <sje@cup.hp.com> wrote:
> > When I get to the gcc_assert I find that dest_mode is CQImode (size 2)
> > and tmp_mode is DImode (size 8) and the assert fails.
>
> I also get the same failure on spu-elf:
> /home/apinski/src/local/gcc/gcc/testsuite/gcc.dg/compat//struct-by-value-11_x.c:9:
> internal compiler error: in emit_group_store, at expr.c:2084^M
>
> And I hear from JSM28, SPARC64 has the same ICE too.
>
If the stack temp size doesnt matter, this patch should work.
H.J.
----
2008-08-15 H.J. Lu <hongjiu.lu@intel.com>
* expr.c (emit_group_store): Don't assert stack temp mode size.
--- gcc/expr.c.dst 2008-08-15 19:41:29.000000000 -0700
+++ gcc/expr.c 2008-08-15 20:37:42.000000000 -0700
@@ -2076,17 +2076,15 @@ emit_group_store (rtx orig_dst, rtx src,
{
enum machine_mode dest_mode = GET_MODE (dest);
enum machine_mode tmp_mode = GET_MODE (tmps[i]);
- int dest_size = GET_MODE_SIZE (dest_mode);
- int tmp_size = GET_MODE_SIZE (tmp_mode);
- gcc_assert (bytepos == 0
- && XVECLEN (src, 0)
- && dest_size == tmp_size);
+ gcc_assert (bytepos == 0 && XVECLEN (src, 0));
if (GET_MODE_ALIGNMENT (dest_mode)
>= GET_MODE_ALIGNMENT (tmp_mode))
{
- dest = assign_stack_temp (dest_mode, dest_size, 0);
+ dest = assign_stack_temp (dest_mode,
+ GET_MODE_SIZE (dest_mode),
+ 0);
emit_move_insn (adjust_address (dest,
tmp_mode,
bytepos),
@@ -2095,7 +2093,9 @@ emit_group_store (rtx orig_dst, rtx src,
}
else
{
- dest = assign_stack_temp (tmp_mode, tmp_size, 0);
+ dest = assign_stack_temp (tmp_mode,
+ GET_MODE_SIZE (tmp_mode),
+ 0);
emit_move_insn (dest, tmps[i]);
dst = adjust_address (dest, dest_mode, bytepos);
}