This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix for crash64.C and other testsuite failures
- To: gcc-patches at gcc dot gnu dot org
- Subject: [PATCH] Fix for crash64.C and other testsuite failures
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 15 Dec 1999 17:21:28 +0100
Hi!
On sparc64, structures are returned in registers up to 32B in size, so in
load_register_parameters args[i].reg is a PARALLEL. The args[i].value can
be const0_rtx though, e.g. as a result of EMPTY_CLASS_EXPR in c++.
That works just fine if the structure is passed in memory, but as it is in
registers, emit_group_load calls emit_move_insn on a VOIDmode REG and
aborts.
This patch fixes at least 40 c++ testsuite failures on sparc64.
1999-12-15 Jakub Jelinek <jakub@redhat.com>
* expr.c (emit_group_load): Use dst mode if src is VOIDmode.
--- gcc/expr.c.jj Fri Dec 10 22:08:30 1999
+++ gcc/expr.c Wed Dec 15 17:00:21 1999
@@ -1908,7 +1908,10 @@ emit_group_load (dst, orig_src, ssize, a
src = orig_src;
if (GET_CODE (src) != MEM)
{
- src = gen_reg_rtx (GET_MODE (orig_src));
+ if (GET_CODE (src) == VOIDmode)
+ src = gen_reg_rtx (GET_MODE (dst));
+ else
+ src = gen_reg_rtx (GET_MODE (orig_src));
emit_move_insn (src, orig_src);
}
Cheers,
Jakub
___________________________________________________________________
Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj
Linux version 2.3.26 on a sparc64 machine (1343.49 BogoMips)
___________________________________________________________________