From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C40FE3858C3A; Fri, 10 Dec 2021 01:16:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C40FE3858C3A From: "vivekrao4 at yahoo dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/56670] Allocatable-length character var causes bogus warning with -Wuninitialized Date: Fri, 10 Dec 2021 01:16:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: vivekrao4 at yahoo dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Dec 2021 01:16:23 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56670 Vivek Rao changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vivekrao4 at yahoo dot com --- Comment #13 from Vivek Rao --- Many warnings that I think are spurious for the code program main implicit none character (len=3D:), allocatable :: words(:) words =3D ["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=3D:), 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 =3D ["dog","cat"] | ^ Warning: 'words.offset' is used uninitialized [-Wuninitialized] xalloc_char.f90:3:42: 3 | character (len=3D:), allocatable :: words(:) | ^ note: 'words' declared here xalloc_char.f90:4:21: 4 | words =3D ["dog","cat"] | ^ Warning: 'words.dim[0].lbound' is used uninitialized [-Wuninitialized] xalloc_char.f90:3:42: 3 | character (len=3D:), allocatable :: words(:) | ^ note: 'words' declared here xalloc_char.f90:4:21: 4 | words =3D ["dog","cat"] | ^ Warning: 'words.dim[0].ubound' is used uninitialized [-Wuninitialized] xalloc_char.f90:3:42: 3 | character (len=3D:), allocatable :: words(:) | ^ note: 'words' declared here xalloc_char.f90:4:21: 4 | words =3D ["dog","cat"] | ^ Warning: 'words.dim[0].lbound' may be used uninitialized [-Wmaybe-uninitialized] xalloc_char.f90:3:42: 3 | character (len=3D:), allocatable :: words(:) | ^ note: 'words' declared here xalloc_char.f90:4:21: 4 | words =3D ["dog","cat"] | ^ Warning: 'words.dim[0].ubound' may be used uninitialized [-Wmaybe-uninitialized] xalloc_char.f90:3:42: 3 | character (len=3D:), allocatable :: words(:) | ^ note: 'words' declared here xalloc_char.f90:4:21: 4 | words =3D ["dog","cat"] | ^ Warning: 'words.dim[0].ubound' may be used uninitialized [-Wmaybe-uninitialized] xalloc_char.f90:3:42: 3 | character (len=3D:), allocatable :: words(:) | ^ note: 'words' declared here xalloc_char.f90:4:21: 4 | words =3D ["dog","cat"] | ^ Warning: 'words.dim[0].lbound' may be used uninitialized [-Wmaybe-uninitialized] xalloc_char.f90:3:42: 3 | character (len=3D:), allocatable :: words(:) | ^ note: 'words' declared here=