This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/48174] New: DWARF for subroutine with no args indicates 'varargs'
- From: "longb at cray dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 17 Mar 2011 22:34:38 +0000
- Subject: [Bug fortran/48174] New: DWARF for subroutine with no args indicates 'varargs'
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48174
Summary: DWARF for subroutine with no args indicates 'varargs'
Product: gcc
Version: 4.5.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: longb@cray.com
> cat test.f
MODULE swim_arrays
REAL, DIMENSION(:,:), ALLOCATABLE :: U
END MODULE
SUBROUTINE ALLOC_ARRAYS
USE swim_arrays
INTEGER N1,N2
PARAMETER (N1=513, N2=4097)
INTEGER status
ALLOCATE(U(N1,N2), STAT=status)
END SUBROUTINE
> gfortran -g -O2 -c test.f
> objdump --dwarf test.o
....
<1><2d>: Abbrev Number: 2 (DW_TAG_subprogram)
<2e> DW_AT_external : 1
<2f> DW_AT_name : (indirect string, offset: 0x0): alloc_arrays
<33> DW_AT_decl_file : 1
<34> DW_AT_decl_line : 5
<35> DW_AT_low_pc : 0x0
<3d> DW_AT_high_pc : 0x83
<45> DW_AT_frame_base : 0x0 (location list)
<49> DW_AT_sibling : <0x79>
<2><4d>: Abbrev Number: 3 (DW_TAG_unspecified_parameters)
.....
The DWARF information (DW_TAG_unspecified_parameters) for subroutine
alloc_arrays above is showing that the subroutine has a variable number of
arguments. This is causing failures in performance tools that use this
information.