Commit d4beaf2a by Janus Weil

re PR fortran/85395 ([F03] private clause contained in derived type acquires spurious scope)

fix PR 85395

2018-09-10  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/85395
	* decl.c (match_binding_attributes): Use correct default accessibility
	for procedure pointer components.

2018-09-10  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/85395
	* gfortran.dg/proc_ptr_comp_52.f90: New test case.

From-SVN: r264196
parent 6f2dde9c
2018-09-10 Janus Weil <janus@gcc.gnu.org>
PR fortran/85395
* decl.c (match_binding_attributes): Use correct default accessibility
for procedure pointer components.
2018-09-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
* simplify.c (gfc_simplify_modulo): Re-arrange code to test whether
......
......@@ -10570,7 +10570,8 @@ match_binding_attributes (gfc_typebound_proc* ba, bool generic, bool ppc)
done:
if (ba->access == ACCESS_UNKNOWN)
ba->access = gfc_typebound_default_access;
ba->access = ppc ? gfc_current_block()->component_access
: gfc_typebound_default_access;
if (ppc && !seen_ptr)
{
......
2018-09-10 Janus Weil <janus@gcc.gnu.org>
PR fortran/85395
* gfortran.dg/proc_ptr_comp_52.f90: New test case.
2018-09-08 Marek Polacek <polacek@redhat.com>
PR c++/87150 - wrong ctor with maybe-rvalue semantics.
......
! { dg-do compile }
!
! PR 85395: [F03] private clause contained in derived type acquires spurious scope
!
! Contributed by <cfd@mnet-mail.de>
module defs
implicit none
type :: base
contains
private
end type
type :: options
procedure(), pointer, nopass :: ptr
end type
type :: t
private
procedure(), pointer, nopass, public :: ptr
end type
end module
program p
use defs
implicit none
type(options) :: self
type(t) :: dt
self%ptr => null()
dt%ptr => null()
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