From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CF501386102D; Thu, 3 Dec 2020 12:09:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF501386102D From: "paul.luckner@rwth-aachen.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/91442] Wrong "may be used uninitialized" warning with allocation on assignment Date: Thu, 03 Dec 2020 12:09:11 +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: 8.1.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: paul.luckner@rwth-aachen.de 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: Thu, 03 Dec 2020 12:09:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D91442 paul.luckner@rwth-aachen.de changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.luckner@rwth-aachen.de --- Comment #2 from paul.luckner@rwth-aachen.de --- Same is true for any other intrinsic data type.=20 Test case for integer array: program test implicit none integer, allocatable :: i(:) i =3D [1] end program Compilation and warning: $ gfortran -Wall -g3 -fcheck=3Dall -fuse-ld=3Dbfd a.f90 4 | i =3D [1] |=20 Warning: =E2=80=98i.offset=E2=80=99 may be used uninitialized in this funct= ion [-Wmaybe-uninitialized] a.f90:4:0: Warning: =E2=80=98i.dim[0].lbound=E2=80=99 may be used uninitial= ized in this function [-Wmaybe-uninitialized]=