Bug 175071 - cannot set breakpoint in preprocessed fortran code
Summary: cannot set breakpoint in preprocessed fortran code
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc4
Version: 4
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-12-06 09:10 UTC by Alexander Täschner
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 4.1.0-0.14
Clone Of:
Environment:
Last Closed: 2006-01-07 17:16:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Alexander Täschner 2005-12-06 09:10:03 UTC
I cannot set a breakpoint on a specific line in a preprocessed fortran file:

[taschna@localhost gdbtest]$ cat main.F
      PROGRAM Test
      IMPLICIT NONE

        WRITE(*,*) 'Hello World'

      END
[taschna@localhost gdbtest]$ gfortran -g -save-temps main.F -o main
[taschna@localhost gdbtest]$ gdb main
GNU gdb Red Hat Linux (6.3.0.0-1.84rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) l
1       # 1 "main.F"
2       # 1 "/home/taschna/gdbtest//"
3       # 1 "<built-in>"
4       # 1 "<command line>"
5       # 1 "main.F"
6             PROGRAM Test
7             IMPLICIT NONE
8
9               WRITE(*,*) 'Hello World'
10
(gdb) b 9
No line 9 in file "main.f".


Using the same file without the preprocessing works fine:

[taschna@localhost gdbtest]$ cp main.F main.f
[taschna@localhost gdbtest]$ gfortran -g -save-temps main.f -o main
[taschna@localhost gdbtest]$ gdb main
.
.
.
(gdb) l
1             PROGRAM Test
2             IMPLICIT NONE
3
4               WRITE(*,*) 'Hello World'
5
6             END
(gdb) b 4
Breakpoint 1 at 0x8048602: file main.f, line 4.

Comment 1 Alexander Täschner 2005-12-07 07:22:06 UTC
According to the comments in the gdb bug database for fortran/2048
(http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-
trail&database=gdb&pr=2048) this is a bug in gfortran, therefore
changing the component tag of this bug.

Comment 3 Jakub Jelinek 2006-01-07 17:16:14 UTC
Should be fixed in gcc-4.1.0-0.14.


Note You need to log in before you can comment on or make changes to this bug.