re PR fortran/86906 (erroneous name clash with renaming in use statement)
2018-08-12 Paul Thomas <pault@gcc.gnu.org> PR fortran/86906 * resolve.c (resolve_fl_variable_derived): Check if the derived type is use associated before checking for the host association error. 2018-08-12 Paul Thomas <pault@gcc.gnu.org> PR fortran/86906 * gfortran.dg/use_rename_9.f90: New test. From-SVN: r263494
This commit is contained in:
parent
a493174524
commit
8532a010b6
4 changed files with 32 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2018-08-12 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/86906
|
||||
* resolve.c (resolve_fl_variable_derived): Check if the derived
|
||||
type is use associated before checking for the host association
|
||||
error.
|
||||
|
||||
2018-08-10 Janus Weil <janus@gcc.gnu.org>
|
||||
|
||||
PR fortran/57160
|
||||
|
|
|
@ -12131,6 +12131,7 @@ resolve_fl_variable_derived (gfc_symbol *sym, int no_init_flag)
|
|||
namespace. 14.6.1.3 of the standard and the discussion on
|
||||
comp.lang.fortran. */
|
||||
if (sym->ns != sym->ts.u.derived->ns
|
||||
&& !sym->ts.u.derived->attr.use_assoc
|
||||
&& sym->ns->proc_name->attr.if_source != IFSRC_IFBODY)
|
||||
{
|
||||
gfc_symbol *s;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2018-08-12 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/86906
|
||||
* gfortran.dg/use_rename_9.f90: New test.
|
||||
|
||||
2018-08-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/86835
|
||||
|
|
19
gcc/testsuite/gfortran.dg/use_rename_9.f90
Normal file
19
gcc/testsuite/gfortran.dg/use_rename_9.f90
Normal file
|
@ -0,0 +1,19 @@
|
|||
! { dg-do compile }
|
||||
!
|
||||
! Test the fix for PR86906, in which a spurious error was generated
|
||||
! by 'config' in the subroutine having the same symbol name as the
|
||||
! renamed 'foo_config'.
|
||||
!
|
||||
! Contributed by Damian Rouson <damian@sourceryinstitute.org>
|
||||
!
|
||||
module foo
|
||||
type config
|
||||
end type
|
||||
end module
|
||||
use foo, only: foo_config => config
|
||||
contains
|
||||
subroutine cap
|
||||
integer config
|
||||
type(foo_config) extra
|
||||
end subroutine
|
||||
end
|
Loading…
Add table
Reference in a new issue