https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70231
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2016-03-15 CC| |jvdelisle at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> --- Interesting: -fdump-tree-original snippets .... snip .... ch_array.dim[0].lbound = 1; ch_array.dim[0].ubound = 0; .... snip .... D.3452 = ch_array.dim[0].lbound; D.3453 = ch_array.dim[0].ubound; .... snip .... S.6 = D.3452; while (1) { if (S.6 > D.3453) goto L.1; __builtin_memmove ((void *) &(*(character(kind=1)[1][1:32] * restrict) atmp.4.data)[offset.5][1]{lb: 1 sz: 1}, (void *) &(*D.3450)[S.6 + D.3451], 32); len.3 = 32; offset.5 = offset.5 + 1; S.6 = S.6 + 1; } L.1:; } } __builtin_memmove ((void *) &(*(character(kind=1)[1][1:32] * restrict) atmp.4.data)[offset.5][1]{lb: 1 sz: 1}, (void *) &ch, 32); if ((integer(kind=8)) (len.3 != 32)) { _gfortran_runtime_error_at (&"At line 8 of file pr70231.f90"[1]{lb: 1 sz: 1}, &"Different CHARACTER lengths (%ld/%ld) in array constructor"[1]{lb: 1 sz: 1}, (integer(kind=8)) len.3, 32); } len.3 does not get set because the lower bound of ch_array is greater than the upperbound, so when the check is done, len.3 is uninitialized.