Commit 3401a17f by Jakub Jelinek Committed by Jakub Jelinek

dwarf2out.c (rtl_for_decl_location): Avoid segfault if DECL_INCOMING_RTL is NULL.

	* dwarf2out.c (rtl_for_decl_location): Avoid segfault if
	DECL_INCOMING_RTL is NULL.

	* gcc.dg/debug/20041023-1.c: New test.

From-SVN: r89554
parent 30a80709
2004-10-25 Jakub Jelinek <jakub@redhat.com>
* dwarf2out.c (rtl_for_decl_location): Avoid segfault if
DECL_INCOMING_RTL is NULL.
2004-10-25 Steven Bosscher <stevenb@suse.de>
* timevar.def (TV_FIND_REFERENCED_VARS): New.
......
......@@ -9807,7 +9807,8 @@ rtl_for_decl_location (tree decl)
if (dmode == pmode)
rtl = DECL_INCOMING_RTL (decl);
else if (SCALAR_INT_MODE_P (dmode)
&& GET_MODE_SIZE (dmode) <= GET_MODE_SIZE (pmode))
&& GET_MODE_SIZE (dmode) <= GET_MODE_SIZE (pmode)
&& DECL_INCOMING_RTL (decl))
{
rtx inc = DECL_INCOMING_RTL (decl);
if (REG_P (inc))
......
2004-10-25 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/debug/20041023-1.c: New test.
2004-10-25 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/17407
......
/* { dg-do compile } */
static void
foo (unsigned char x)
{
unsigned char a[5 + x];
}
void
bar (void)
{
foo (80);
}
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