This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/14527] New: Segfault in can_throw_internal
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Mar 2004 10:16:51 -0000
- Subject: [Bug middle-end/14527] New: Segfault in can_throw_internal
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Following testcase causes cc1plus segfault on i386 on gcc-3_4-branch as of today.
It worked with a gcc-3_4-branch snapshot from end of January and works on 3.3
branch and trunk, so it should be handled as a regression.
// { dg-do compile }
// { dg-options "-O2" }
extern char *foo (char *, int);
struct A
{
int i;
void bar (char *);
};
struct B
{
B ();
void baz (void *);
};
struct C
{
C (const char *, int);
};
void
A::bar (char *a)
{
B *b;
char *p1, *p2 = a + 512;
while (foo (a, 511))
{
b = new B ();
p1 = a;
while (*p1)
{
b->baz (new C (p1, p2 - p1));
p1 = *p2 ? p2 + 1 : p2;
}
}
}
--
Summary: Segfault in can_throw_internal
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: x86_64-redhat-linux
GCC target triplet: i386-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14527