https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56670
Vivek Rao <vivekrao4 at yahoo dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vivekrao4 at yahoo dot com --- Comment #13 from Vivek Rao <vivekrao4 at yahoo dot com> --- Many warnings that I think are spurious for the code program main implicit none character (len=:), allocatable :: words(:) words = ["dog","cat"] print*,words end program main compiled with gfortran -Wall xalloc_char.f90 using GNU Fortran (GCC) 12.0.0 20211024 (experimental) from equation.com on Windows gives xalloc_char.f90:3:42: 3 | character (len=:), allocatable :: words(:) | ^ Warning: '.words' is used uninitialized [-Wuninitialized] xalloc_char.f90:1:12: 1 | program main | ^ note: '.words' was declared here xalloc_char.f90:4:21: 4 | words = ["dog","cat"] | ^ Warning: 'words.offset' is used uninitialized [-Wuninitialized] xalloc_char.f90:3:42: 3 | character (len=:), allocatable :: words(:) | ^ note: 'words' declared here xalloc_char.f90:4:21: 4 | words = ["dog","cat"] | ^ Warning: 'words.dim[0].lbound' is used uninitialized [-Wuninitialized] xalloc_char.f90:3:42: 3 | character (len=:), allocatable :: words(:) | ^ note: 'words' declared here xalloc_char.f90:4:21: 4 | words = ["dog","cat"] | ^ Warning: 'words.dim[0].ubound' is used uninitialized [-Wuninitialized] xalloc_char.f90:3:42: 3 | character (len=:), allocatable :: words(:) | ^ note: 'words' declared here xalloc_char.f90:4:21: 4 | words = ["dog","cat"] | ^ Warning: 'words.dim[0].lbound' may be used uninitialized [-Wmaybe-uninitialized] xalloc_char.f90:3:42: 3 | character (len=:), allocatable :: words(:) | ^ note: 'words' declared here xalloc_char.f90:4:21: 4 | words = ["dog","cat"] | ^ Warning: 'words.dim[0].ubound' may be used uninitialized [-Wmaybe-uninitialized] xalloc_char.f90:3:42: 3 | character (len=:), allocatable :: words(:) | ^ note: 'words' declared here xalloc_char.f90:4:21: 4 | words = ["dog","cat"] | ^ Warning: 'words.dim[0].ubound' may be used uninitialized [-Wmaybe-uninitialized] xalloc_char.f90:3:42: 3 | character (len=:), allocatable :: words(:) | ^ note: 'words' declared here xalloc_char.f90:4:21: 4 | words = ["dog","cat"] | ^ Warning: 'words.dim[0].lbound' may be used uninitialized [-Wmaybe-uninitialized] xalloc_char.f90:3:42: 3 | character (len=:), allocatable :: words(:) | ^ note: 'words' declared here