Commit ee332da9 by Paul Thomas

re PR fortran/33542 (gfortran does not detect ambigious specific names if they…

re PR fortran/33542 (gfortran does not detect ambigious specific names if they are the same as generic names)

2007-10-04  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/33542
	* interface.c (check_interface1): Revert patch of 2007-10-02.
	
2007-10-04  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/33542
	* gfortran.dg/ambiguous_specific_1.f90: Remove.

From-SVN: r129000
parent 231d0665
2007-10-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33542
* interface.c (check_interface1): Revert patch of 10-02.
2007-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/26682
......
......@@ -1044,8 +1044,7 @@ check_interface1 (gfc_interface *p, gfc_interface *q0,
if (p->sym->name == q->sym->name && p->sym->module == q->sym->module)
continue;
if (compare_interfaces (p->sym, q->sym, generic_flag)
|| p->sym->name == q->sym->name)
if (compare_interfaces (p->sym, q->sym, generic_flag))
{
if (referenced)
{
......
2007-10-04 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33542
* gfortran.dg/ambiguous_specific_1.f90: Remove.
2007-10-03 Alexandre Oliva <aoliva@redhat.com>
* g++.dg/ext/gnu-inline-global-redecl.C: New.
! { dg-do compile }
! Checks the fix for PR33542, in which the ambiguity in the specific
! interfaces of foo was missed.
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
!
MODULE M1
INTERFACE FOO
MODULE PROCEDURE FOO2
END INTERFACE
CONTAINS
SUBROUTINE FOO2(I)
INTEGER, INTENT(IN) :: I
WRITE(*,*) 'INTEGER'
END SUBROUTINE FOO2
END MODULE M1
MODULE M2
INTERFACE FOO
MODULE PROCEDURE FOO2
END INTERFACE
CONTAINS
SUBROUTINE FOO2(R)
REAL, INTENT(IN) :: R
WRITE(*,*) 'REAL'
END SUBROUTINE FOO2
END MODULE M2
PROGRAM P
USE M1 ! { dg-error "Ambiguous interfaces" }
USE M2
implicit none
external bar
CALL FOO(10)
CALL FOO(10.)
END PROGRAM P
! { dg-final { cleanup-modules "m1 m2" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment