+function short:long (val) %{
+ THIS->__retvalue = (short) THIS->val;
+%}
+
+function int:long (val) %{
+ THIS->__retvalue = (int) THIS->val;
+%}
+
probe process(@1).mark("char_var") {
if ($arg1 != 126)
printf("FAIL: char_var\n")
probe process(@1).mark("const_short_int_var")
{
- if ($arg1 != -32767)
+ if (short($arg1) != -32767)
printf("FAIL: const_short_int_var\n")
else
printf("PASS: const_short_int_var\n")
probe process(@1).mark("volatile_short_int_var")
{
- if ($arg1 != -32767)
+ if (short($arg1) != -32767)
printf("FAIL: volatile_short_int_var\n")
else
printf("PASS: volatile_short_int_var\n")
probe process(@1).mark("const_int_var")
{
- if ($arg1 != -65536)
+ if (int($arg1) != int(-65536))
printf("FAIL: const_int_var\n")
else
printf("PASS: const_int_var\n")
probe process(@1).mark("volatile_int_var")
{
- if ($arg1 != -65536)
+ if (int($arg1) != int(-65536))
printf("FAIL: volatile_int_var\n")
else
printf("PASS: volatile_int_var\n")
probe process(@1).mark("const_long_int_var")
{
- if ($arg1 != -65536)
+ if (int($arg1) != int(-65536))
printf("FAIL: const_long_int_var\n")
else
printf("PASS: const_long_int_var\n")
probe process(@1).mark("volatile_long_int_var")
{
- if ($arg1 != -65536)
+ if (int($arg1) != int(-65536))
printf("FAIL: volatile_long_int_var\n")
else
printf("PASS: volatile_long_int_var\n")
probe process(@1).mark("const_long_long_int_var")
{
- if ($arg1 != -65536)
+ if (int($arg1) != int(-65536))
printf("FAIL: const_long_long_int_var\n")
else
printf("PASS: const_long_long_int_var\n")
probe process(@1).mark("volatile_long_long_int_var")
{
- if ($arg1 != -65536)
+ if (int($arg1) != int(-65536))
printf("FAIL: volatile_long_long_int_var\n")
else
printf("PASS: volatile_long_long_int_var\n")
probe process(@1).mark("bitfields_bit_var")
{
- if ($arg1 != 65 || $arg2 != -1 || $arg3 != 1 || $arg4 != 1
+ if ($arg1 != 65 || ((int($arg2)) != (int(-1))) || $arg3 != 1 || $arg4 != 1
|| $arg5 != 3 || $arg6 != 3 || $arg7 != 7 || $arg8 != 255
|| $arg9 != 511 || $arg10 != 90)
printf("FAIL: bitfields_bit_var\n")
else
printf("PASS: primary_colors_var\n")
}
-
-
-
-
-
-
-
-
-
-
-