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.

Reply via email to