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
This commit is contained in:
parent
26677eb88e
commit
eec14ce5ec
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -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;
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
19
gcc/testsuite/gfortran.dg/namelist_30.f90
Normal file
19
gcc/testsuite/gfortran.dg/namelist_30.f90
Normal file
@ -0,0 +1,19 @@
|
||||
! { 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
|
Loading…
Reference in New Issue
Block a user