* src/SDCCval.c (valNot): fix for regression test failure
[fw/sdcc] / src / SDCCval.c
index 11d80e4aa9411c5e6ccd810e1ed0a3eef346f8a5..e278fb93a901f52777d12df03835ab9f3549ad9c 100644 (file)
@@ -1044,14 +1044,14 @@ valNot (value * val)
   if (SPEC_LONG (val->etype))
     {
       if (SPEC_USIGN (val->etype))
-        SPEC_CVAL (val->etype).v_ulong = !SPEC_CVAL (val->etype).v_ulong;
+        SPEC_CVAL (val->etype).v_int = !SPEC_CVAL (val->etype).v_ulong;
       else
-        SPEC_CVAL (val->etype).v_long = !SPEC_CVAL (val->etype).v_long;
+        SPEC_CVAL (val->etype).v_int = !SPEC_CVAL (val->etype).v_long;
     }
   else
     {
       if (SPEC_USIGN (val->etype))
-        SPEC_CVAL (val->etype).v_uint = !SPEC_CVAL (val->etype).v_uint;
+        SPEC_CVAL (val->etype).v_int = !SPEC_CVAL (val->etype).v_uint;
       else
         SPEC_CVAL (val->etype).v_int = !SPEC_CVAL (val->etype).v_int;