This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/17126] [3.5 Regression] ICE in GC with non-unit-at-a-time
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Aug 2004 01:40:59 -0000
- Subject: [Bug middle-end/17126] [3.5 Regression] ICE in GC with non-unit-at-a-time
- References: <20040820204405.17126.bommar33@msu.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-08-21 01:40 -------
Here's a reduced testcase (it was really a tough one).
Compile with "gcc -fno-unit-at-a-time -O3 --param ggc-min-expand=0
--param ggc-min-heapsize=0" to see the crash.
=============================================================
typedef struct { volatile int i; } atomic_t;
struct S { atomic_t a; };
static void down(struct S* s)
{
__asm__ __volatile__("" :"=m" (s->a) :"c" (s) :"memory");
}
static void foo1(struct S *s)
{
down(s);
}
static void foo2(struct S *s)
{
foo3();
}
static void foo4() {}
typedef void (*fp) (struct S*);
static fp f1 = { foo1 };
static fp f2 = { foo2 };
static void foo5()
{
foo4();
}
void foo6()
{
foo3();
foo7(foo5);
}
=============================================================
bug.c: In function `foo5':
bug.c:28: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17126