From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BA7BA3858CD1; Fri, 23 Feb 2024 19:15:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BA7BA3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1708715750; bh=D5GdcBOHQFG5W+k+8KtDJ7lss/Qfo0VURr7rYBpuj2k=; h=From:To:Subject:Date:In-Reply-To:References:From; b=L8ZoDmbw+sPgObENxHS998SjGcVoss9aFiHt6edu4EadWkea7RS+q4nhBXFySDmhl ldqeuexEvYBWEOuFLb52Ch4cLc00BtQCjxt1iBVt1Tp5T2k5NimWDzr2m1wLMPnkRJ d9/TYAp19WhGtkTvm14iub7AQnrU7kbpnY/x45JU= From: "w6ws at earthlink dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/77504] [11/12/13/14 Regression] "is used uninitialized" with allocatable string and array constructors Date: Fri, 23 Feb 2024 19:15:46 +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: unknown X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: w6ws at earthlink dot net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P4 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.5 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D77504 Walter Spector changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |w6ws at earthlink dot net --- Comment #31 from Walter Spector --- Super simple test case: wws@w6ws-4:~/computer/fortran/tests$ /usr/local/bin/gfortran --version GNU Fortran (GCC) 14.0.1 20240115 (experimental) Copyright (C) 2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. wws@w6ws-4:~/computer/fortran/tests$ cat a.f90 program catenate_test implicit none integer, allocatable :: a(:) a =3D (/ 1, 3, 5 /) print *, 'size(a) =3D', size (a) print *, 'a =3D', a end program wws@w6ws-4:~/computer/fortran/tests$ /usr/local/bin/gfortran -o a a.f90 wws@w6ws-4:~/computer/fortran/tests$ /usr/local/bin/gfortran -Wall -o a a.f= 90 a.f90:6:19: 6 | a =3D (/ 1, 3, 5 /) | ^ Warning: =E2=80=98a.offset=E2=80=99 is used uninitialized [-Wuninitialized] a.f90:4:30: 4 | integer, allocatable :: a(:) | ^ note: =E2=80=98a=E2=80=99 declared here a.f90:6:19: 6 | a =3D (/ 1, 3, 5 /) | ^ Warning: =E2=80=98a.dim[0].lbound=E2=80=99 is used uninitialized [-Wuniniti= alized] a.f90:4:30: 4 | integer, allocatable :: a(:) | ^ note: =E2=80=98a=E2=80=99 declared here a.f90:6:19: 6 | a =3D (/ 1, 3, 5 /) | ^ Warning: =E2=80=98a.dim[0].ubound=E2=80=99 is used uninitialized [-Wuniniti= alized] a.f90:4:30: 4 | integer, allocatable :: a(:) | ^ note: =E2=80=98a=E2=80=99 declared here a.f90:6:19: 6 | a =3D (/ 1, 3, 5 /) | ^ Warning: =E2=80=98a.dim[0].lbound=E2=80=99 may be used uninitialized [-Wmay= be-uninitialized] a.f90:4:30: 4 | integer, allocatable :: a(:) | ^ note: =E2=80=98a=E2=80=99 declared here a.f90:6:19: 6 | a =3D (/ 1, 3, 5 /) | ^ Warning: =E2=80=98a.dim[0].ubound=E2=80=99 may be used uninitialized [-Wmay= be-uninitialized] a.f90:4:30: 4 | integer, allocatable :: a(:) | ^ note: =E2=80=98a=E2=80=99 declared here wws@w6ws-4:~/computer/fortran/tests$ ./a size(a) =3D 3 a =3D 1 3 5 wws@w6ws-4:~/computer/fortran/tests$=