Commit 31c304ba by Steven Bosscher Committed by Steven Bosscher

re PR rtl-optimization/23943 (segv in side_effects_p())

gcc/
	PR rtl-optimization/23943
	* cse.c (find_best_addr): Never propagate an EXPR_LIST rtx.

testsuite/
	* gcc.dg/pr23943.c: New test.

From-SVN: r104413
parent 02c375d9
2005-09-19 Steven Bosscher <stevenb@suse.de>
PR rtl-optimization/23943
* cse.c (find_best_addr): Never propagate an EXPR_LIST rtx.
2005-09-18 Jan Hubicka <jh@suse.cz> 2005-09-18 Jan Hubicka <jh@suse.cz>
* calls.c (flags_from_decl_or_type): Do not set ECF_LIBCALL_BLOCK. * calls.c (flags_from_decl_or_type): Do not set ECF_LIBCALL_BLOCK.
......
...@@ -2999,7 +2999,9 @@ find_best_addr (rtx insn, rtx *loc, enum machine_mode mode) ...@@ -2999,7 +2999,9 @@ find_best_addr (rtx insn, rtx *loc, enum machine_mode mode)
p = p->next_same_value, count++) p = p->next_same_value, count++)
if (! p->flag if (! p->flag
&& (REG_P (p->exp) && (REG_P (p->exp)
|| exp_equiv_p (p->exp, p->exp, 1, false))) || (GET_CODE (p->exp) != EXPR_LIST
&& exp_equiv_p (p->exp, p->exp, 1, false))))
{ {
rtx new = simplify_gen_binary (GET_CODE (*loc), Pmode, rtx new = simplify_gen_binary (GET_CODE (*loc), Pmode,
p->exp, op1); p->exp, op1);
......
2005-09-19 Steven Bosscher <stevenb@suse.de>
* gcc.dg/pr23943.c: New test.
2005-09-18 Paul Thomas <pault@gcc.gnu.org> 2005-09-18 Paul Thomas <pault@gcc.gnu.org>
PR fortran/19181 PR fortran/19181
/* This used to ICE in side_effects_p, due to a problem in cse.c.
Origin: marcus at jet dot franken dot de. */
/* { dg-do compile { target x86_64-*-* } } */
/* { dg-options "-O2 -fPIC" } */
typedef long unsigned int size_t;
extern size_t strlen (__const char *__s)
__attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
static char savecallsin[256] = "";
int read_agent_config(void)
{
savecallsin[0] = '\0';
if (savecallsin[strlen(savecallsin) - 1] != '/')
__builtin___strncat_chk (savecallsin, "/", sizeof(savecallsin) - strlen(savecallsin) - 1, __builtin_object_size (savecallsin, 2 > 1)) ;
return 0;
}
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