blob: 776b1052f13597aa94bcd86e545726e2b2a90c5c [file] [log] [blame]
Duncan Sandsd939f4a2008-10-13 19:56:36 +00001/* RUN: %llvmgcc %s -S -o - -emit-llvm -O0 | grep {zeroinitializer.*zeroinitializer.*zeroinitializer.*zeroinitializer.*zeroinitializer.*zeroinitializer}
Dale Johannesenea98fe22008-08-08 03:37:11 +00002
3The FE must generate padding here both at the end of each PyG_Head and
4between array elements. Reduced from Python. */
5
6typedef union _gc_head {
7 struct {
8 union _gc_head *gc_next;
9 union _gc_head *gc_prev;
10 long gc_refs;
11 } gc;
12 int dummy __attribute__((aligned(16)));
13} PyGC_Head;
14
15struct gc_generation {
16 PyGC_Head head;
17 int threshold;
18 int count;
19};
20
21#define GEN_HEAD(n) (&generations[n].head)
22
23/* linked lists of container objects */
24static struct gc_generation generations[3] = {
25 /* PyGC_Head, threshold, count */
26 {{{GEN_HEAD(0), GEN_HEAD(0), 0}}, 700, 0},
27 {{{GEN_HEAD(1), GEN_HEAD(1), 0}}, 10, 0},
28 {{{GEN_HEAD(2), GEN_HEAD(2), 0}}, 10, 0},
29};