[Bug fortran/13251] [gfortran] wrong error: character kind=0 not available

steven at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Dec 5 10:09:00 GMT 2003


------- Additional Comments From steven at gcc dot gnu dot org  2003-12-05 10:08 -------
Lemme start by saying that whatever the Intel Fortran compiler compiles is not 
necessarily valid Fortran.  In fact their compiler is notoriously buggy and 
non-conformant.  Oh well... 
 
This bug is of course real.  At first I thought, "characters and modules, so 
probably a known bug".  But it seems that we're just not propagating the kind 
of a derived type field to the expression, as demonstrated by the following 
reduced test case: 
 
------------------------------------- 
type :: foo 
  character(32) :: bar 
end type 
 
type (foo) :: tmp 
character(32) :: t 
 
t = tmp%bar(1:32) 
end 
------------------------------------- 
 
So this is a type resolution problem.  I'm looking into this... 
 
BTW, the error you get here is not really a "wrong error".  It's more like an 
internal compiler error.  The error is issued from one of the trans-* files, 
which expect a fully resolved and finished Fortran "compilation unit".  
Anything that fails after this is in fact an ICE, so we should probably use 
"internal_error" instead of "fatal_error"... 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2003-12-02 15:53:35         |2003-12-05 10:09:02
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13251



More information about the Gcc-bugs mailing list