This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/35006] [4.3 Regression] Segfault in remove_unused_locals
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jan 2008 00:48:40 -0000
- Subject: [Bug tree-optimization/35006] [4.3 Regression] Segfault in remove_unused_locals
- References: <bug-35006-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pinskia at gcc dot gnu dot org 2008-01-29 00:48 -------
Here is a reduced testcase:
typedef unsigned long grub_uint64_t;
typedef grub_uint64_t grub_size_t;
grub_cmdline_get (
unsigned max_len,
int echo_char
)
{
unsigned xpos, ypos, ystart;
grub_size_t lpos, llen;
char buf[max_len];
void cl_print (int pos, int c)
{
char *p;
for (p = buf + pos; *p; p++)
{
if (xpos++ > 78)
grub_putchar ('\n');
grub_putchar (*p);
}
}
void cl_delete (unsigned len)
{
cl_set_pos ();
cl_print (lpos, ' ');
grub_memmove ();
cl_print (lpos, echo_char);
cl_set_pos ();
}
cl_delete (llen);
grub_size_t n = lpos;
cl_delete (n);
}
---- CUT ----
Adding -fdump-tree-all, the ICE goes away.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC target triplet| |x86_64-*-*
Last reconfirmed|0000-00-00 00:00:00 |2008-01-29 00:48:40
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35006