blob: 7d7df4a8ad1b5f6cb4bfbaef8d90b35a210c420a [file] [log] [blame]
Dale Johannesenea98fe22008-08-08 03:37:11 +00001/* RUN: %llvmgcc %s -m64 -S -o - -emit-llvm -O0 | grep zeroinitializer | count 6
2
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};