This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: PR32634 -- reverted patch, gfortran.dg/interface_16.f90 failure
- From: "Paul Richard Thomas" <paul dot richard dot thomas at gmail dot com>
- To: "Daniel Franke" <franke dot daniel at gmail dot com>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, "gcc-patches List" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 12 Jul 2007 21:07:15 +0200
- Subject: Re: PR32634 -- reverted patch, gfortran.dg/interface_16.f90 failure
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NPcXNjdgfJ5q62zXfaeHx4JR+sItPVPPV3iHtl0+W52C07LpSvu/+50Of/K0KGq3uImbM6Od3gvHfYdCfiD3MTQgap3Q6XSvyw4PGBQGtQEj3YnoMQWT4TYBzoGVgUd9yXn0/UE9Sxgh/2zBlRN0LvZLQaFtSvo3b6V5dRUklhQ=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=N8BM/NwsP5eq51alJ5cEDaCpslhVDIHZo57A+sRt2wqdMJG9HawgC9ZMo3tiM8HAHyKeCUnmcfNrrfPh8MBlJQdxuLwwTjGR/X8nv6217B3NLynarZI2xv+A1pNoehXafH+debb5anDB7Kn4EjeEJLwJzM1Hf/t1yMe2KcWIXgk=
- References: <339c37f20707120450y7ae2d641ucb173423d7486857@mail.gmail.com>
This is a fix relative to the unreverted case - it turned out to be trivial.
Thanks for helping me out Daniel.
Regtested on Cygwin_NT/amd64
Paul
Index: /svn/trunk/gcc/fortran/module.c
===================================================================
*** /svn/trunk/gcc/fortran/module.c (revision 126509)
--- /svn/trunk/gcc/fortran/module.c (working copy)
*************** write_generic (gfc_symbol *sym)
*** 3961,3967 ****
at least once. */
nuse = number_use_names (sym->name);
if (nuse == 0)
! nuse = 1;
for (j = 1; j <= nuse; j++)
{
--- 3961,3970 ----
at least once. */
nuse = number_use_names (sym->name);
if (nuse == 0)
! {
! mio_symbol_interface (&sym->name, &sym->module, &sym->generic);
! return;
! }
for (j = 1; j <= nuse; j++)
{
! { dg-do compile }
! Tests the fix for PR32727, which was a regression caused
! by the fix for PR32634
!
! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
!
MODULE kinds
INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND ( 14, 200 )
END MODULE kinds
MODULE util
USE kinds, ONLY: dp
INTERFACE sort
MODULE PROCEDURE sort2
END INTERFACE
CONTAINS
SUBROUTINE sort2 ( )
END SUBROUTINE sort2
END MODULE util
MODULE graphcon
USE util, ONLY: sort
END MODULE graphcon
! { dg-final { cleanup-modules "kinds util graphcon" } }