1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-31 16:02:52 +01:00
llvm-mirror/test/FrontendC/2008-08-07-AlignPadding1.c
Duncan Sands a119167d74 Don't barf on 32 bit platforms if llvm-gcc is
not built with 64 bit support.  Since this test
passes without -m64 on x86-32-linux, just remove
the -m64.

llvm-svn: 57462
2008-10-13 19:56:36 +00:00

30 lines
937 B
C

/* RUN: %llvmgcc %s -S -o - -emit-llvm -O0 | grep {zeroinitializer.*zeroinitializer.*zeroinitializer.*zeroinitializer.*zeroinitializer.*zeroinitializer}
The FE must generate padding here both at the end of each PyG_Head and
between array elements. Reduced from Python. */
typedef union _gc_head {
struct {
union _gc_head *gc_next;
union _gc_head *gc_prev;
long gc_refs;
} gc;
int dummy __attribute__((aligned(16)));
} PyGC_Head;
struct gc_generation {
PyGC_Head head;
int threshold;
int count;
};
#define GEN_HEAD(n) (&generations[n].head)
/* linked lists of container objects */
static struct gc_generation generations[3] = {
/* PyGC_Head, threshold, count */
{{{GEN_HEAD(0), GEN_HEAD(0), 0}}, 700, 0},
{{{GEN_HEAD(1), GEN_HEAD(1), 0}}, 10, 0},
{{{GEN_HEAD(2), GEN_HEAD(2), 0}}, 10, 0},
};