Commit eec14ce5 by Daniel Franke Committed by Daniel Franke

re PR fortran/32710 (ICE: namelist and subroutine with the same name)

gcc/fortran:
2007-07-22  Daniel Franke  <franke.daniel@gmail.com>

	PR fortran/32710
	* parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
	the current is a namelist.

gcc/testsuite:
2007-07-22  Daniel Franke  <franke.daniel@gmail.com>

	PR fortran/32710
	* gfortran.dg/namelist_30.f90: New test.

From-SVN: r126828
parent 26677eb8
2007-07-22 Daniel Franke <franke.daniel@gmail.com>
PR fortran/32710
* parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
the current is a namelist.
2007-07-22 Daniel Franke <franke.daniel@gmail.com>
PR fortran/29962
PR fortran/31253
PR fortran/31265
......
......@@ -2769,7 +2769,8 @@ gfc_fixup_sibling_symbols (gfc_symbol *sym, gfc_namespace *siblings)
if ((old_sym->attr.flavor == FL_PROCEDURE
|| old_sym->ts.type == BT_UNKNOWN)
&& old_sym->ns == ns
&& !old_sym->attr.contained)
&& !old_sym->attr.contained
&& old_sym->attr.flavor != FL_NAMELIST)
{
/* Replace it with the symbol from the parent namespace. */
st->n.sym = sym;
......
2007-07-22 Daniel Franke <franke.daniel@gmail.com>
PR fortran/32710
* gfortran.dg/namelist_30.f90: New test.
2007-07-22 Daniel Franke <franke.daniel@gmail.com>
PR fortran/29962
* gfortran.dg/array_initializer_1.f90: Removed warning.
* gfortran.dg/initialization_1.f90: Adjusted messages.
! { dg-do compile }
!
! PR fortran/32710 - ICE: namelist and subroutine with the same name
!
! Contributed by Janus Weil <jaydub66 AT gmail DOT com>
!
program x
contains
subroutine readInput
integer:: a
NAMELIST /foo/ a
read(5,nml=foo)
end subroutine readInput
subroutine foo()
end subroutine
end program
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