[Bug fortran/77532] ICE in check_dtio_interface1, at fortran/interface.c:4622

kargl at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Sep 14 01:10:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77532

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #6 from kargl at gcc dot gnu.org ---
(In reply to Gerhard Steinmetz from comment #5)
> Thank you very much for working on these issues.
> Additional tests with an improved version from 20160911
> revealed a few other errors, as bespoken attached hereto :
> 
> 
> $ cat za1.f90
> module m
>    type t
>    end type
>    interface write(formatted)
>       module procedure s
>    end interface
> contains
>    subroutine s(dtv,unit,iotype,vlist,extra,iostat,iomsg)
>       class(t), intent(in) :: dtv
>       integer, intent(in) :: unit
>       character(len=*), intent(in) :: iotype
>       integer, intent(in) :: vlist(:)
>       integer, intent(out) :: iostat
>       character(len=*), intent(inout) :: iomsg
>    end
> end
> 
> 
> $ cat za2.f90
> module m
>    type t
>    end type
>    interface read(formatted)
>       module procedure s
>    end interface
> contains
>    subroutine s(dtv,unit,iotype,vlist,iostat,iomsg,extra)
>       class(t), intent(inout) :: dtv
>       integer, intent(in) :: unit
>       character(len=*), intent(in) :: iotype
>       integer, intent(in) :: vlist(:)
>       integer, intent(out) :: iostat
>       character(len=*), intent(inout) :: iomsg
>    end
> end
> 
> 
> $ cat za3.f90
> module m
>    type t
>    end type
>    interface read(formatted)
>       module procedure s
>    end interface
> contains
>    subroutine s(dtv,extra,unit,iotype,vlist,iostat,iomsg)
>       class(t), intent(inout) :: dtv
>       integer, intent(in) :: unit
>       character(len=*), intent(in) :: iotype
>       integer, intent(in) :: vlist(:)
>       integer, intent(out) :: iostat
>       character(len=*), intent(inout) :: iomsg
>    end
> end
> 
> 
> $ gfortran-7-20160911 za1.f90
> za1.f90:8:43:
> 
>     subroutine s(dtv,unit,iotype,vlist,extra,iostat,iomsg)
>                                            1
> Error: DTIO dummy argument at (1) must be of type INTEGER
> za1.f90:8:50:
> 
>     subroutine s(dtv,unit,iotype,vlist,extra,iostat,iomsg)
>                                                   1
> Error: DTIO dummy argument at (1) must be of type CHARACTER
> f951: internal compiler error: in check_dtio_interface1, at
> fortran/interface.c:4707

troutmask:sgk[218] svn diff interface.c
Index: interface.c
===================================================================
--- interface.c (revision 240119)
+++ interface.c (working copy)
@@ -4704,7 +4704,7 @@ check_dtio_interface1 (gfc_symbol *deriv
                                     0, intent);
          break;
        default:
-         gcc_unreachable ();
+         gfc_internal_error ("check_dtio_interface1: invalid argument");
        }
     }
   derived->attr.has_dtio_procs = 1;


More information about the Gcc-bugs mailing list