Commit 8532a010 by Paul Thomas

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
parent a4931745
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> 2018-08-10 Janus Weil <janus@gcc.gnu.org>
PR fortran/57160 PR fortran/57160
......
...@@ -12131,6 +12131,7 @@ resolve_fl_variable_derived (gfc_symbol *sym, int no_init_flag) ...@@ -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 namespace. 14.6.1.3 of the standard and the discussion on
comp.lang.fortran. */ comp.lang.fortran. */
if (sym->ns != sym->ts.u.derived->ns if (sym->ns != sym->ts.u.derived->ns
&& !sym->ts.u.derived->attr.use_assoc
&& sym->ns->proc_name->attr.if_source != IFSRC_IFBODY) && sym->ns->proc_name->attr.if_source != IFSRC_IFBODY)
{ {
gfc_symbol *s; gfc_symbol *s;
......
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> 2018-08-11 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/86835 PR tree-optimization/86835
......
! { 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
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