mpz_and (x->value.integer, x->value.integer, gfc_unsigned_kinds[k].huge);
}
+ x->ts.type = BT_UNSIGNED;
+ x->ts.kind = kind;
+
/* Clear boz info. */
x->boz.rdx = 0;
x->boz.len = 0;
switch (q->ts.type)
{
case BT_INTEGER:
+ case BT_UNSIGNED:
mpz_init_set (q->value.integer, p->value.integer);
break;
strncpy (q->boz.str, p->boz.str, p->boz.len);
break;
- case BT_UNSIGNED:
- gfc_internal_error ("Unsigned not yet implemented");
-
case BT_PROCEDURE:
case BT_VOID:
/* Should never be reached. */
/* Convert BOZ to integer, and return without range checking. */
if (e->ts.type == BT_BOZ)
{
- if (!gfc_boz2int (e, kind))
+ if (!gfc_boz2uint (e, kind))
return NULL;
result = gfc_copy_expr (e);
return result;
if (uint(r) /= 5u) error stop 5
c = (6.2,-1.2)
if (uint(c) /= 6u) error stop 6
+
+ if (uint(z'ff') /= 255u) error stop 7
end program main