*op = dtio_op (buffer);
if (*op == INTRINSIC_FORMATTED)
{
+ if (flag_default_integer)
+ goto conflict;
strcpy (name, gfc_code2string (dtio_procs, DTIO_RF));
*type = INTERFACE_DTIO;
}
if (*op == INTRINSIC_UNFORMATTED)
{
+ if (flag_default_integer)
+ goto conflict;
strcpy (name, gfc_code2string (dtio_procs, DTIO_RUF));
*type = INTERFACE_DTIO;
}
*op = dtio_op (buffer);
if (*op == INTRINSIC_FORMATTED)
{
+ if (flag_default_integer)
+ goto conflict;
strcpy (name, gfc_code2string (dtio_procs, DTIO_WF));
*type = INTERFACE_DTIO;
}
if (*op == INTRINSIC_UNFORMATTED)
{
+ if (flag_default_integer)
+ goto conflict;
strcpy (name, gfc_code2string (dtio_procs, DTIO_WUF));
*type = INTERFACE_DTIO;
}
*type = INTERFACE_NAMELESS;
return MATCH_YES;
+conflict:
+ gfc_error ("Sorry: -fdefault-integer-8 option is not supported with "
+ "user-defined input/output at %C");
+ return MATCH_ERROR;
+
syntax:
gfc_error ("Syntax error in generic specification at %C");
return MATCH_ERROR;
--- /dev/null
+! { dg-do compile }
+! { dg-options "-fdefault-integer-8" }
+
+module mymod
+ type :: my_type
+ real :: value
+ end type
+
+ interface write(formatted) ! { dg-error "is not supported" }
+ module procedure write_formatted ! { dg-error "a generic module interface" }
+ end interface ! { dg-error "Expecting" }
+
+contains
+ subroutine write_formatted(dtv, unit, iotype, v_list, iostat, iomsg)
+ class(my_type), intent(in) :: dtv
+ integer, intent(in) :: unit
+ character(*), intent(in) :: iotype
+ integer, intent(in) :: v_list(:)
+ integer, intent(out) :: iostat
+ character(*), intent(inout) :: iomsg
+ end subroutine write_formatted
+end module