mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 06:30:19 +00:00
0de1951a33
of the target's pointer size. This avoids the need for -m32 on the llvm-gcc command-line, which some targets may not support. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73270 91177308-0d34-0410-b5e6-96231b3b80d8
40 lines
1010 B
C
40 lines
1010 B
C
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars2 | grep {\\\[2 x \\\[2 x i8\\\]\\\]}
|
|
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars2 | grep {, i\[\[:digit:\]\]\\+ 1)} | count 1
|
|
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars3 | grep {\\\[2 x i16\\\]}
|
|
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars3 | grep {, i\[\[:digit:\]\]\\+ 1)} | count 1
|
|
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars4 | grep {\\\[2 x \\\[2 x i8\\\]\\\]} | count 1
|
|
// RUN: %llvmgcc %s -S -emit-llvm -O0 -o - | grep svars4 | grep {, i\[\[:digit:\]\]\\+ 1, i\[\[:digit:\]\]\\+ 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]) }
|
|
};
|