re PR fortran/20896 (ambiguous interface not detected)

2007-01-02  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/20896
	* interface.c (check_sym_interfaces): Remove call to
	resolve_global_procedure.
	gfortran.h : Remove prototype for resolve_global_procedure.
	resolve.c (resolve_global_procedure): Add static attribute
	to function declaration.

2007-01-02  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/20896
	* gfortran.dg/interface_10.f90: Remove.

From-SVN: r120342
This commit is contained in:
Paul Thomas 2007-01-02 14:23:36 +00:00
parent 06d40de8bb
commit ff60488853
6 changed files with 15 additions and 40 deletions

View file

@ -1,3 +1,12 @@
2007-01-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20896
* interface.c (check_sym_interfaces): Remove call to
resolve_global_procedure.
gfortran.h : Remove prototype for resolve_global_procedure.
resolve.c (resolve_global_procedure): Add static attribute
to function declaration.
2007-01-01 Steven G. Kargl <kargls@comcast.net>
* ChangeLog: Copy to ...

View file

@ -2032,7 +2032,6 @@ void gfc_free_statement (gfc_code *);
void gfc_free_statements (gfc_code *);
/* resolve.c */
void resolve_global_procedure (gfc_symbol *, locus *, int);
try gfc_resolve_expr (gfc_expr *);
void gfc_resolve (gfc_namespace *);
void gfc_resolve_blocks (gfc_code *, gfc_namespace *);

View file

@ -1016,11 +1016,6 @@ check_sym_interfaces (gfc_symbol * sym)
if (sym->ns != gfc_current_ns)
return;
if (sym->attr.if_source == IFSRC_IFBODY
&& sym->attr.flavor == FL_PROCEDURE
&& !sym->attr.mod_proc)
resolve_global_procedure (sym, &sym->declared_at, sym->attr.subroutine);
if (sym->generic != NULL)
{
sprintf (interface_name, "generic interface '%s'", sym->name);

View file

@ -1235,7 +1235,7 @@ find_noncopying_intrinsics (gfc_symbol * fnsym, gfc_actual_arglist * actual)
reference. The corresponding code that is called in creating
global entities is parse.c. */
void
static void
resolve_global_procedure (gfc_symbol *sym, locus *where, int sub)
{
gfc_gsymbol * gsym;

View file

@ -1,3 +1,8 @@
2007-01-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/20896
* gfortran.dg/interface_10.f90: Remove.
2007-01-01 Roger Sayle <roger@eyesopen.com>
* gcc.dg/fold-eqxor-4.c: New test case.

View file

@ -1,33 +0,0 @@
! { dg-do compile }
! Test the fix for PR20896 in which the ambiguous use
! of p was not detected.
!
! Contributed by Joost VandeVondele <jv244@cam.ac.uk>
!
INTERFACE g
SUBROUTINE s1(p) ! { dg-error "is already being used" }
INTERFACE
SUBROUTINE p
END
END INTERFACE
END
SUBROUTINE s2(p) ! { dg-error "Global name" }
INTERFACE
REAL FUNCTION p()
END
END INTERFACE
END
END INTERFACE
INTERFACE
REAL FUNCTION x()
END
END INTERFACE
INTERFACE
SUBROUTINE y
END
END INTERFACE
call g (x)
call g (y)
END