mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-26 06:22:56 +02:00
e27a52f9b1
on systems which default to a 64-bit target. llvm-svn: 73265
40 lines
952 B
C
40 lines
952 B
C
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars2 | grep {\\\[2 x \\\[2 x i8\\\]\\\]}
|
|
// RUN: %llvmgcc -m32 %s -S -emit-llvm -O0 -o - | grep svars2 | grep {i32 1} | count 1
|
|
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars3 | grep {\\\[2 x i16\\\]}
|
|
// RUN: %llvmgcc -m32 %s -S -emit-llvm -O0 -o - | grep svars3 | grep {i32 1} | count 1
|
|
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars4 | grep {\\\[2 x \\\[2 x i8\\\]\\\]} | count 1
|
|
// RUN: %llvmgcc -m32 %s -S -emit-llvm -O0 -o - | grep svars4 | grep {i32 1, i32 1} | count 1
|
|
// PR 4349
|
|
|
|
union reg
|
|
{
|
|
unsigned char b[2][2];
|
|
unsigned short w[2];
|
|
unsigned int d;
|
|
};
|
|
struct cpu
|
|
{
|
|
union reg pc;
|
|
};
|
|
extern struct cpu cpu;
|
|
struct svar
|
|
{
|
|
void *ptr;
|
|
};
|
|
struct svar svars1[] =
|
|
{
|
|
{ &((cpu.pc).w[0]) }
|
|
};
|
|
struct svar svars2[] =
|
|
{
|
|
{ &((cpu.pc).b[0][1]) }
|
|
};
|
|
struct svar svars3[] =
|
|
{
|
|
{ &((cpu.pc).w[1]) }
|
|
};
|
|
struct svar svars4[] =
|
|
{
|
|
{ &((cpu.pc).b[1][1]) }
|
|
};
|