This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch, Fortran, 4.4 Regression] PR38152: procedure pointers as module variables
- From: Janus Weil <janus at gcc dot gnu dot org>
- To: Mark Mitchell <mark at codesourcery dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Jakub Jelinek <jakub at redhat dot com>, Richard Guenther <richard dot guenther at gmail dot com>, gcc patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 8 Apr 2009 13:09:42 +0200
- Subject: [Patch, Fortran, 4.4 Regression] PR38152: procedure pointers as module variables
- References: <854832d40904070804t2164762fy9b9578d3d2de0797@mail.gmail.com>
Dear Release Managers,
I was wondering what the current status of the 4.4 branch is. Is it
still possible to commit regression fixes? I have this small patch,
which was just approved and applied to trunk. It is a 4.4 regression
(even if not a bad one), pretty simple and low-risk.
Can I apply this to the 4.4 branch or should I wait until the release
has happened?
Cheers,
Janus
---------- Forwarded message ----------
From: Janus Weil <janus@gcc.gnu.org>
Date: 2009/4/7
Subject: [Patch, Fortran] PR38152: procedure pointers as module variables
To: gfortran <fortran@gcc.gnu.org>, gcc patches <gcc-patches@gcc.gnu.org>
Hi all,
here is a one-line fix for a problem with proc_ptr_13.f90 I discovered
today. The test case works as long as it is not compiled with "-g"
(which results in a segfault).
Regression-tested on x86_64-unknown-linux-gnu. Ok for trunk?
Should I also backport this to 4.4? If yes, would this be possible
before the release, or should I wait? It definitely is a regression
(in the way that 4.3 gave a "not implemented" message, while 4.4 gives
an ICE).
Cheers,
Janus
2009-04-07 ?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-07 ?Janus Weil ?<janus@gcc.gnu.org>
? ? ? ?PR fortran/38152
? ? ? ?* gfortran.dg/proc_ptr_13.f90: Add "-g" option.
Index: gcc/testsuite/gfortran.dg/proc_ptr_13.f90
===================================================================
--- gcc/testsuite/gfortran.dg/proc_ptr_13.f90 (Revision 145668)
+++ gcc/testsuite/gfortran.dg/proc_ptr_13.f90 (Arbeitskopie)
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "-g" }
!
! PR 38152: Procedure pointers as module variables.
!
Index: gcc/fortran/trans-decl.c
===================================================================
--- gcc/fortran/trans-decl.c (Revision 145668)
+++ gcc/fortran/trans-decl.c (Arbeitskopie)
@@ -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;
}