public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
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 20:16:05 +0000 [thread overview]
Message-ID: <bug-77504-4-C7zEdweWlI@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-77504-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77504
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
Depends on| |106089
--- Comment #32 from kargl at gcc dot gnu.org ---
(In reply to Walter Spector from comment #31)
> 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 = (/ 1, 3, 5 /)
>
> print *, 'size(a) =', size (a)
> print *, 'a =', 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.f90
> a.f90:6:19:
>
> 6 | a = (/ 1, 3, 5 /)
> | ^
> Warning: ‘a.offset’ is used uninitialized [-Wuninitialized]
> a.f90:4:30:
>
> 4 | integer, allocatable :: a(:)
> | ^
> note: ‘a’ declared here
> a.f90:6:19:
>
> 6 | a = (/ 1, 3, 5 /)
> | ^
> Warning: ‘a.dim[0].lbound’ is used uninitialized [-Wuninitialized]
> a.f90:4:30:
>
> 4 | integer, allocatable :: a(:)
> | ^
> note: ‘a’ declared here
> a.f90:6:19:
>
> 6 | a = (/ 1, 3, 5 /)
> | ^
> Warning: ‘a.dim[0].ubound’ is used uninitialized [-Wuninitialized]
> a.f90:4:30:
>
> 4 | integer, allocatable :: a(:)
> | ^
> note: ‘a’ declared here
> a.f90:6:19:
>
> 6 | a = (/ 1, 3, 5 /)
> | ^
> Warning: ‘a.dim[0].lbound’ may be used uninitialized [-Wmaybe-uninitialized]
> a.f90:4:30:
>
> 4 | integer, allocatable :: a(:)
> | ^
> note: ‘a’ declared here
> a.f90:6:19:
>
> 6 | a = (/ 1, 3, 5 /)
> | ^
> Warning: ‘a.dim[0].ubound’ may be used uninitialized [-Wmaybe-uninitialized]
> a.f90:4:30:
>
> 4 | integer, allocatable :: a(:)
> | ^
> note: ‘a’ declared here
> wws@w6ws-4:~/computer/fortran/tests$ ./a
> size(a) = 3
> a = 1 3 5
> wws@w6ws-4:~/computer/fortran/tests$
See ttps://gcc.gnu.org/bugzilla/show_bug.cgi?id=106089
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106089
[Bug 106089] false positives with -Wuninitialized for allocation on assignment
prev parent reply other threads:[~2024-02-23 20:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-77504-4@http.gcc.gnu.org/bugzilla/>
2020-07-24 14:45 ` [Bug fortran/77504] [8/9/10/11 " dev-zero at gentoo dot org
2020-07-24 15:57 ` kargl at gcc dot gnu.org
2020-07-24 16:47 ` tkoenig at gcc dot gnu.org
2020-07-24 17:20 ` kargl at gcc dot gnu.org
2020-07-27 12:43 ` dev-zero at gentoo dot org
2021-03-31 22:50 ` msebor at gcc dot gnu.org
2021-05-14 9:48 ` [Bug fortran/77504] [9/10/11/12 " jakub at gcc dot gnu.org
2021-06-01 8:08 ` rguenth at gcc dot gnu.org
2022-01-17 14:24 ` mailling-lists-bd at posteo dot de
2022-05-27 9:36 ` [Bug fortran/77504] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:32 ` jakub at gcc dot gnu.org
2023-07-07 10:31 ` [Bug fortran/77504] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-02-23 19:15 ` w6ws at earthlink dot net
2024-02-23 20:16 ` kargl at gcc dot gnu.org [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-77504-4-C7zEdweWlI@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).