http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54534

Joel Brobecker <brobecker at gnat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |brobecker at gnat dot com

--- Comment #2 from Joel Brobecker <brobecker at gnat dot com> 2012-09-10 
21:59:26 UTC ---
Hello, here is another example in Ada where we are also missing the location
information even though, at least on the surface, the variable is used:

    with Ada.Text_IO; use Ada.Text_IO;

    procedure Subprogram is
       X : String := "hello";
       Y : String := "goodbye";
       Z : constant String := X & Y;
    begin
       Put_Line (X);  --  BREAK HERE
       Put_Line (Y);
       Put_Line (Z);
    end Subprogram;

Trying to print the value of variables X and Y yield the same result
(<optimized out>), because the location attribute is missing.

I don't think it's a huge loss to not be able to print the value of unused
variables, but I think that the example above is more problematic. Restoring
the previous behavior, even if accidental, would really help...

(thank you!)

Reply via email to