mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 20:11:17 +00:00
39 lines
709 B
Plaintext
39 lines
709 B
Plaintext
const byte AA = ~0;
|
|
const byte BB = 200 ;
|
|
const uint CC = ~0;
|
|
const uint DD = FOO;
|
|
|
|
const FOO = ~0;
|
|
|
|
uint x = AA;
|
|
uint z = CC;
|
|
byte w = FOO;
|
|
ushort v = FOO;
|
|
uint z2 = DD;
|
|
|
|
func void test()
|
|
{
|
|
int xx = FOO;
|
|
int* yy = &&FOO;
|
|
}
|
|
|
|
// #expect: constants.ll
|
|
|
|
@AA = protected constant i8 -1
|
|
@BB = protected constant i8 -56
|
|
@CC = protected constant i32 -1
|
|
@DD = protected constant i32 -1
|
|
@x = protected global i32 255
|
|
@z = protected global i32 -1
|
|
@w = protected global i8 -1
|
|
@v = protected global i16 -1
|
|
@z2 = protected global i32 -1
|
|
|
|
entry:
|
|
%xx = alloca i32
|
|
%yy = alloca i32*
|
|
%taddr = alloca i32
|
|
store i32 -1, i32* %xx
|
|
store i32 -1, i32* %taddr
|
|
store i32* %taddr, i32** %yy
|
|
ret void |