Maybe this is a side effect of fixing a DWARF bug, but using GCC 4.5 with
gdb (GDB) SUSE (6.8.50.20090302-41.3) [contains "Merge FC11 update 23"] does
not work while with GCC 4.4 it does.

Example (compile with gfortran -g):

PROGRAM test
  INTEGER, DIMENSION(3) :: a1,a2
  a1 = 1
  PRINT*, a1
  a2 = 2
end program test

GCC 4.4 with gdb:

(gdb) b 3
Breakpoint 1 at 0x4007a7: file test.f90, line 3.
(gdb) run
Starting program: /dev/shm/a.out
Breakpoint 1, test () at test.f90:3
3         a1 = 1
Current language:  auto; currently fortran
(gdb) n
4         PRINT*, a1
(gdb) pt a1
type = integer(kind=4) (3)
(gdb) p a1
$1 = (1, 1, 1)
(gdb) n
           1           1           1
5         a2 = 2


GCC 4.5 with gdb:

(gdb) b 3
Breakpoint 1 at 0x400738: file test.f90, line 3.
(gdb) run
Starting program: /dev/shm/a.out
Breakpoint 1, test () at test.f90:3
3         a1 = 1
Current language:  auto; currently fortran
(gdb) p a1
$1 = (8, 0, -1417923840)
(gdb) n
           1           1           1
0x00002aaaab48ca4d in __libc_start_main () from /lib64/libc.so.6


-- 
           Summary: [4.5 Regression] Wierd break points with 4.5, works with
                    4.4
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: wrong-debug
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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

Reply via email to