mirror of
https://github.com/danog/ir.git
synced 2024-12-11 16:59:46 +01:00
20 lines
289 B
Plaintext
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;
|
||
|
}
|