public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/109472] New: [13 regression] False unread/unassigned warning for variable in local package
@ 2023-04-11 14:32 simon at pushface dot org
  2023-04-12  8:45 ` [Bug ada/109472] " ebotcazou at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: simon at pushface dot org @ 2023-04-11 14:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109472

            Bug ID: 109472
           Summary: [13 regression] False unread/unassigned warning for
                    variable in local package
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: simon at pushface dot org
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

Created attachment 54830
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54830&action=edit
Demonstrator

The compiler warns that a variable in a local package is not assigned and not
read, even though it is assigned and read in code outside the package.

GNAT 13.0.1 20230409 (experimental)
Copyright 1992-2023, Free Software Foundation, Inc.

Compiling: test_wu.adb
Source file time stamp: 2023-04-11 14:20:32
Compiled at: 2023-04-11 15:30:49

     1. procedure Test_Wu is
     2.
     3.   package P is
     4.     X : Integer;
            |
        >>> warning: variable "X" is never read and never assigned [-gnatwu]

     5.   end;
     6.
     7.   Y : Integer;
     8.
     9. begin
    10.   P.X := 5;
    11.   Y := P.X;
    12. end;

 12 lines: No errors, 1 warning

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-05-21  9:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-11 14:32 [Bug ada/109472] New: [13 regression] False unread/unassigned warning for variable in local package simon at pushface dot org
2023-04-12  8:45 ` [Bug ada/109472] " ebotcazou at gcc dot gnu.org
2023-04-12 10:28 ` rguenth at gcc dot gnu.org
2023-04-12 14:31 ` dkm at gcc dot gnu.org
2023-04-26  6:58 ` [Bug ada/109472] [13/14 regression] False unread/unassigned warning for variable in local package since r13-1626-ga8d17a88a52d2f rguenth at gcc dot gnu.org
2023-07-27  9:25 ` rguenth at gcc dot gnu.org
2024-05-21  9:14 ` [Bug ada/109472] [13/14/15 " jakub at gcc dot gnu.org

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).