re PR fortran/38152 (procedure pointers as module variables)

2009-04-08  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/38152
	* trans-decl.c (gfc_get_symbol_decl): Correctly set decl location for
	procedure pointer decls.


2009-04-08  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/38152
	* gfortran.dg/proc_ptr_13.f90: Add "-g" option.

From-SVN: r145735
This commit is contained in:
Janus Weil 2009-04-08 16:03:33 +02:00
parent d67252400f
commit 0c86425957
2 changed files with 4 additions and 1 deletions

View File

@ -1015,10 +1015,12 @@ gfc_get_symbol_decl (gfc_symbol * sym)
if (sym->backend_decl)
return sym->backend_decl;
/* Catch function declarations. Only used for actual parameters. */
/* Catch function declarations. Only used for actual parameters and
procedure pointers. */
if (sym->attr.flavor == FL_PROCEDURE)
{
decl = gfc_get_extern_function_decl (sym);
gfc_set_decl_location (decl, &sym->declared_at);
return decl;
}

View File

@ -1,4 +1,5 @@
! { dg-do compile }
! { dg-options "-g" }
!
! PR 38152: Procedure pointers as module variables.
!