Bounds-checking for correct character length in array-constructors without F2003 typespec (all strings are required to have the same length) does not work sometimes, for instance the code
call test ("this is long") contains subroutine test(s) character(len=*) :: s character(len=128) :: arr(2) arr = (/ s, "abc" /) end subroutine test end Should give a runtime-error when compiled with "-fbounds-check" and run but it doesn't; swapping the array constructor to be arr = (/ "abc", s /) does, however (which is presumably correct). -- Summary: Bounds-checking on character length not working for array-constructors Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: d at domob dot eu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36112