https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101871
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
CC| |kargl at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2021-08-12
--- Comment #1 from kargl at gcc dot gnu.org ---
(In reply to David Sagan from comment #0)
>
> call out_io_lines2 ([character(80):: &
> 'Beam parameters not computed at: ' // trim(name), &
> 'Singular sigma matrix is:', &
> ' \6es15.7\', ' \6es15.7\', ' \6es15.7\', ' \6es15.7\', '
> \6es15.7\', ' \6es15.7\', &
> 'Will not print any more singular sigma matrices'])
For some reason, gfortran is ignoring the type-spec
in the array constructor of the actual argument if
one uses the concatenation operator in the first
element of the constructor. The length is set to
that of the first element.
This is going to be entertaining for whomever
takes on the challenge. Here's a modified
test to consider
program tao_program
implicit none
integer i
character(80) abc(9)
character(40) name
name = 'H'
abc = [character(80) :: 'a'//trim(name), 'ab', 'abc', 'd', 'def', 'g', &
& 'ghi', 'z', 'zy']
call io([character(80) :: 'a'//trim(name), 'ab', 'abc', 'd', &
& 'def', 'g', 'ghi', 'z', 'zyxwvut'])
print *
abc = [character(80) :: 'a', 'ab', 'abc', 'd'//trim(name), 'def', 'g', &
& 'ghi', 'z', 'zy']
call io([character(80) :: 'a', 'ab', 'abc', 'd'//trim(name), &
& 'def', 'g', 'ghi', 'z', 'zyxwvut'])
contains
subroutine io (lines)
implicit none
character(*) lines(:)
integer i
do i = 1, size(lines)
write(*,'(I0,A)') i, ' ' // trim(abc(i)) // ' ' // trim(lines(i))
end do
end subroutine io
end program