This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/85981] ICE in gfc_trans_string_copy, at fortran/trans-expr.c:6539


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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2018-05-29
                 CC|                            |kargl at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to G. Steinmetz from comment #1)
> Works with character(kind=1) :
> 
> 
> $ cat z2.f90
> program p
>    integer, allocatable :: arr(:)
>    integer :: stat
>    character(len=128, kind=1) :: errmsg = ' '
>    allocate (arr(3), stat=stat, errmsg=errmsg)
>    print *, allocated(arr), stat, trim(errmsg)
> end
> 
> 
> $ gfortran-9-20180527 z2.f90 -static-libgfortran
> $ a.out
>  T           0

It ought to work with kind=1.  For the original code,
and error message should be issued as kind=4 is not
default character kind.

R928  alloc-opt             is ERRMSG = errmsg-variable
R930  errmsg-variable       is scalar-default-char-variable
R906  default-char-variable is variable
C906  default-char-variable shall be default character.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]