ir/tests/c/conv_002.irt
2022-05-20 01:01:48 +03:00

20 lines
289 B
Plaintext

--TEST--
002: type conversion ZEXT
--ARGS--
--emit-c
--CODE--
{
l_1 = START(l_4);
uint32_t x = PARAM(l_1, "x", 1);
uint64_t ret = ZEXT(x);
l_4 = RETURN(l_1, ret);
}
--EXPECT--
uint64_t test(uint32_t x)
{
uint32_t d_1 = x;
uint64_t d_2;
d_2 = (uint64_t)(uint32_t)d_1;
return d_2;
}