gcc/fortran/ChangeLog:
* module.cc (mio_expr): Handle BT_UNSIGNED.
gcc/testsuite/ChangeLog:
* gfortran.dg/unsigned_42.f90: New test.
switch (e->ts.type)
{
case BT_INTEGER:
+ case BT_UNSIGNED:
mio_gmp_integer (&e->value.integer);
break;
--- /dev/null
+! { dg-do compile }
+! { dg-options "-funsigned" }
+module mytype
+ integer, parameter :: uk = selected_unsigned_kind(12)
+end module mytype
+
+module foo
+ use mytype
+ implicit none
+ unsigned(uk), parameter :: seed0 = 1u_uk
+ unsigned(uk), protected :: x_ = seed0
+end module foo