Commit 7c7ce73a by Ulrich Weigand Committed by Ulrich Weigand

re PR rtl-optimization/27661 (ICE in subst_reloads)

	PR rtl-optimization/27661
	* reload.c (find_reloads): When reloading a VOIDmode constant
	as address due to an EXTRA_MEMORY_CONSTRAINT or 'o' constraint,
	use Pmode as mode of the reload register.

	PR rtl-optimization/27661
	* gcc.dg/pr27661.c: New test case.

From-SVN: r114141
parent c539d463
2006-05-26 Ulrich Weigand <uweigand@de.ibm.com>
PR rtl-optimization/27661
* reload.c (find_reloads): When reloading a VOIDmode constant
as address due to an EXTRA_MEMORY_CONSTRAINT or 'o' constraint,
use Pmode as mode of the reload register.
2006-05-26 Eric Botcazou <ebotcazou@adacore.com>
* doc/invoke.texi (Optimize Options): Document that -funit-at-a-time
......
......@@ -3854,11 +3854,19 @@ find_reloads (rtx insn, int replace, int ind_levels, int live_known,
&& goal_alternative_offmemok[i]
&& MEM_P (recog_data.operand[i]))
{
/* If the address to be reloaded is a VOIDmode constant,
use Pmode as mode of the reload register, as would have
been done by find_reloads_address. */
enum machine_mode address_mode;
address_mode = GET_MODE (XEXP (recog_data.operand[i], 0));
if (address_mode == VOIDmode)
address_mode = Pmode;
operand_reloadnum[i]
= push_reload (XEXP (recog_data.operand[i], 0), NULL_RTX,
&XEXP (recog_data.operand[i], 0), (rtx*) 0,
base_reg_class (VOIDmode, MEM, SCRATCH),
GET_MODE (XEXP (recog_data.operand[i], 0)),
address_mode,
VOIDmode, 0, 0, i, RELOAD_FOR_INPUT);
rld[operand_reloadnum[i]].inc
= GET_MODE_SIZE (GET_MODE (recog_data.operand[i]));
......
2006-05-26 Ulrich Weigand <uweigand@de.ibm.com>
PR rtl-optimization/27661
* gcc.dg/pr27661.c: New test case.
2006-05-26 Thomas Koenig <Thomas.Koenig@online.de>
PR fortran/23151
/* This used to ICE on s390 due to a reload bug. */
/* { dg-do compile { target s390*-*-* } } */
/* { dg-options "-O2 -march=z990 -ftracer" } */
extern int memcmp (const void *s1, const void *s2, unsigned long n);
extern int printf (__const char *__restrict __format, ...);
struct test
{
char tmp[4096];
char msgtype[2];
};
void test (struct test *testtb)
{
if (testtb)
printf ("a");
if (memcmp(testtb->msgtype, "a", 2))
printf ("a");
printf ("b");
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment