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

--- Comment #5 from kargl at gcc dot gnu.org ---
(In reply to Gerhard Steinmetz from comment #2)
> Another group of examples.
> First case is working in a sufficient manner.
> Concatenating two empty hulls (zero len and size, respectivly)
> gives an empty hull as result again.
> 
> 
> $ cat zz1.f90
> program p
>    character(*), parameter :: c1(*) = [character(*) :: 'a'] // [character(*)
> :: 'z']
>    character(*), parameter :: c2(*) = [character(0) ::] // [character(0) ::]
>    character(*), parameter :: c3(*) = [character(0) ::] // [character(*) ::]
>    character(*), parameter :: c4(*) = [character(0) ::]
>    print *, 'c1: ', len(c1), size(c1), c1
>    print *, 'c2: ', len(c2), size(c2), c2
>    print *, 'c3: ', len(c3), size(c3), c3
>    print *, 'c4: ', len(c4), size(c4), c4
> end
> 

gfortran issues errors for this testcase.  Some are run-on errors.
I'm showing the first two as I think gfortran might be correct.

a.f90:2:39:

    character(*), parameter :: c1(*) = [character(*) :: 'a'] // [character(*)
:: 'z']
                                       1
Error: Type-spec at (1) cannot contain an asterisk for a type parameter
a.f90:4:60:

    character(*), parameter :: c3(*) = [character(0) ::] // [character(*) ::]
                                                            1

Reply via email to