http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37245
--- Comment #4 from Timo Lindfors <timo.lindfors at iki dot fi> 2011-09-01 00:31:16 UTC --- The bug still occurs for me on debian testing: lindi2:~/tmp$ gnatmake -ggdb3 -O0 gdb_bug_2 gcc-4.4 -c -ggdb3 -O0 gdb_bug_2.adb gdb_bug_2.adb:25:07: warning: variable "gs" is read but never assigned gnatbind -x gdb_bug_2.ali gnatlink gdb_bug_2.ali -ggdb3 lindi2:~/tmp$ gdb ./gdb_bug_2 GNU gdb (GDB) 7.2-debian Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/lindi/tmp/gdb_bug_2...done. (gdb) break breakpoint Breakpoint 1 at 0x401322: file gdb_bug_2.adb, line 16. (gdb) run Starting program: /home/lindi/tmp/gdb_bug_2 Breakpoint 1, gdb_bug_2.fitg5.breakpoint () at gdb_bug_2.adb:16 16 end Breakpoint; (gdb) print var1 No definition of "var1" in current context. (gdb) print var2 $1 = 43 (gdb) quit A debugging session is active. Inferior 1 [process 11766] will be killed. Quit anyway? (y or n) y lindi2:~/tmp$ dpkg-query -W gdb gdb 7.2-1 lindi2:~/tmp$ dpkg-query -W gcc gcc 4:4.6.1-2 lindi2:~/tmp$ cat /proc/version Linux version 3.0.0-1-amd64 (Debian 3.0.0-1) (b...@decadent.org.uk) (gcc version 4.5.3 (Debian 4.5.3-4) ) #1 SMP Sun Jul 24 02:24:44 UTC 2011 lindi2:~/tmp$ md5sum gdb_bug_2.adb 58638c361f25465b7a6288d0a69c7964 gdb_bug_2.adb and unstable: (sid)lindi1:~/tmp$ gnatmake -ggdb3 -O0 gdb_bug_2 gcc-4.4 -c -ggdb3 -O0 gdb_bug_2.adb gdb_bug_2.adb:25:07: warning: variable "gs" is read but never assigned gnatbind -x gdb_bug_2.ali gnatlink gdb_bug_2.ali -ggdb3 (sid)lindi1:~/tmp$ gdb ./gdb_bug_2 GNU gdb (GDB) 7.3-debian Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /home/lindi/tmp/gdb_bug_2...done. (gdb) break breakpoint Breakpoint 1 at 0x401322: file gdb_bug_2.adb, line 16. (gdb) run Starting program: /home/lindi/tmp/gdb_bug_2 Breakpoint 1, gdb_bug_2.fitg5.breakpoint () at gdb_bug_2.adb:16 16 end Breakpoint; (gdb) print var1 No definition of "var1" in current context. (gdb) print var2 $1 = 43 (gdb) quit A debugging session is active. Inferior 1 [process 16208] will be killed. Quit anyway? (y or n) y (sid)lindi1:~/tmp$ dpkg-query -W gdb gdb 7.3-1 (sid)lindi1:~/tmp$ dpkg-query -W gcc gcc 4:4.6.1-2 (sid)lindi1:~/tmp$ cat /proc/version Linux version 2.6.32-5-amd64 (Debian 2.6.32-35) (da...@debian.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Tue Jun 14 09:42:28 UTC 2011 (the unstable one is in a chroot so it is running older kernel in case you wonder.)