https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70233
Bug ID: 70233 Summary: Missing diagnostic in array constructor, different size strings Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: jvdelisle at gcc dot gnu.org Target Milestone: --- In the following code, one case of the constructor gives an error and one does not. integer, parameter :: char_len = 32 character(char_len), allocatable :: ch_array(:) character(char_len) :: ch, bh allocate(ch_array(5)) print *,lbound(ch_array), ubound(ch_array) ch = "a" bh = "b" ! ch_array = [bh, "def", ch, ch, bh]! no error given ch_array = ["def", bh, ch, ch, ch] ! error given print *, ch_array deallocate(ch_array) end