mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-20 11:00:57 +08:00
re PR middle-end/23199 (ICE in int_mode_for_mode, at stor-layout.c:251)
PR middle-end/23199 * cfgrtl.c (safe_insert_insn_on_edge): Use can_copy_p to detect whether registers live on the edge can be saved/restored. From-SVN: r105618
This commit is contained in:
parent
486516b60b
commit
e48050bd06
@ -1,3 +1,9 @@
|
||||
2005-10-19 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
PR middle-end/23199
|
||||
* cfgrtl.c (safe_insert_insn_on_edge): Use can_copy_p to detect
|
||||
whether registers live on the edge can be saved/restored.
|
||||
|
||||
2005-10-19 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
* config/sh/sh.c (fixup_mova): Skip notes.
|
||||
|
10
gcc/cfgrtl.c
10
gcc/cfgrtl.c
@ -1456,16 +1456,9 @@ safe_insert_insn_on_edge (rtx insn, edge e)
|
||||
regset killed;
|
||||
rtx save_regs = NULL_RTX;
|
||||
unsigned regno;
|
||||
int noccmode;
|
||||
enum machine_mode mode;
|
||||
reg_set_iterator rsi;
|
||||
|
||||
#ifdef AVOID_CCMODE_COPIES
|
||||
noccmode = true;
|
||||
#else
|
||||
noccmode = false;
|
||||
#endif
|
||||
|
||||
killed = ALLOC_REG_SET (®_obstack);
|
||||
|
||||
for (x = insn; x; x = NEXT_INSN (x))
|
||||
@ -1491,7 +1484,8 @@ safe_insert_insn_on_edge (rtx insn, edge e)
|
||||
if (mode == VOIDmode)
|
||||
return false;
|
||||
|
||||
if (noccmode && mode == CCmode)
|
||||
/* Avoid copying in CCmode if we can't. */
|
||||
if (!can_copy_p (mode))
|
||||
return false;
|
||||
|
||||
save_regs = alloc_EXPR_LIST (0,
|
||||
|
@ -1,3 +1,7 @@
|
||||
2005-10-19 Eric Botcazou <ebotcazou@libertysurf.fr>
|
||||
|
||||
* gcc.dg/profile-generate-2.c: New test.
|
||||
|
||||
2005-10-18 Danny Smith <dannysmith@users.sourceforge.net>
|
||||
|
||||
PR target/23589
|
||||
|
35
gcc/testsuite/gcc.dg/profile-generate-2.c
Normal file
35
gcc/testsuite/gcc.dg/profile-generate-2.c
Normal file
@ -0,0 +1,35 @@
|
||||
/* PR middle-end/23199 */
|
||||
/* Testcase by Ralf Menzel <menzel@ls6.cs.uni-dortmund.de> */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -fprofile-generate" } */
|
||||
|
||||
union rtunion_def
|
||||
{
|
||||
struct rtx_def *rt_rtx;
|
||||
};
|
||||
|
||||
typedef union rtunion_def rtunion;
|
||||
|
||||
struct rtx_def
|
||||
{
|
||||
unsigned int in_struct : 1;
|
||||
union u {
|
||||
rtunion fld[1];
|
||||
} u;
|
||||
};
|
||||
|
||||
typedef struct rtx_def *rtx;
|
||||
|
||||
static void
|
||||
check_annul_list_true_false (int annul_true_p, rtx delay_list)
|
||||
{
|
||||
rtx temp;
|
||||
while (1)
|
||||
{
|
||||
temp = delay_list;
|
||||
rtx trial = (((temp)->u.fld[0]).rt_rtx);
|
||||
if ((annul_true_p && (((trial))->in_struct)))
|
||||
return;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user