PR fortran/33818
* resolve.c (resolve_variable): Check that symbol is in the same
namespace as the entry function.
2007-10-20 Tobias Burnus <burnus@net-b.de>
PR fortran/33818
* gfortran.dg/entry_dummy_ref_3.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129510
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-10-20 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/33818
+ * resolve.c (resolve_variable): Check that symbol is in the same
+ namespace as the entry function.
+
2007-10-20 Paul Thomas <pault@gcc.gnu.org>
FX Coudert <fxcoudert@gcc.gnu.org>
bool seen;
/* If the symbol is a dummy... */
- if (sym->attr.dummy)
+ if (sym->attr.dummy && sym->ns == gfc_current_ns)
{
entry = gfc_current_ns->entries;
seen = false;
if (!seen)
{
if (specification_expr)
- gfc_error ("Variable '%s',used in a specification expression, "
- "is referenced at %L before the ENTRY statement "
+ gfc_error ("Variable '%s', used in a specification expression"
+ ", is referenced at %L before the ENTRY statement "
"in which it is a parameter",
sym->name, &cs_base->current->loc);
else
+2007-10-20 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/33818
+ * gfortran.dg/entry_dummy_ref_3.f90: New.
+
2007-10-20 Paul Thomas <pault@gcc.gnu.org>
FX Coudert <fxcoudert@gcc.gnu.org>
--- /dev/null
+! { dg-do compile }
+!
+! PR fortran/33818
+!
+
+subroutine ExportZMX(lu)
+ implicit none
+ integer :: lu
+ interface
+ function LowerCase(str)
+ character(*),intent(in) :: str
+ character(len(str)) :: LowerCase
+ end function LowerCase
+ end interface
+ character(*),parameter :: UNAME(1:1)=(/'XXX'/)
+ write(lu,'(a)') 'UNIT '//UpperCase(UNAME(1))
+ write(lu,'(a)') 'Unit '//LowerCase(UNAME(1))
+entry ExportSEQ(lu)
+contains
+ function UpperCase(str) result(res)
+ character(*),intent(in) :: str
+ character(len(str)) res
+ res=str
+ end function
+end