This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/17126] [3.5 Regression] ICE in GC with non-unit-at-a-time


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]