+2009-05-11 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/40089
+ * resolve.c (resolve_fl_derived): Only return FAILURE if
+ gfc_notify_std fails.
+
2009-05-10 Ian Lance Taylor <iant@google.com>
* gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of
&& !is_sym_host_assoc (c->ts.derived, sym->ns)
&& !c->ts.derived->attr.use_assoc
&& !gfc_check_access (c->ts.derived->attr.access,
- c->ts.derived->ns->default_access))
- {
- gfc_notify_std (GFC_STD_F2003, "Fortran 2003: the component '%s' "
- "is a PRIVATE type and cannot be a component of "
- "'%s', which is PUBLIC at %L", c->name,
- sym->name, &sym->declared_at);
- return FAILURE;
- }
+ c->ts.derived->ns->default_access)
+ && gfc_notify_std (GFC_STD_F2003, "Fortran 2003: the component '%s' "
+ "is a PRIVATE type and cannot be a component of "
+ "'%s', which is PUBLIC at %L", c->name,
+ sym->name, &sym->declared_at) == FAILURE)
+ return FAILURE;
if (sym->attr.sequence)
{
+2009-05-11 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/40089
+ * gfortran.dg/proc_ptr_comp_7.f90: New.
+
2009-05-11 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/40074
--- /dev/null
+! { dg-do compile }
+!
+! PR 40089: Public type with public component which has a private type
+!
+! Original test case by Juergen Reuter <reuter@physik.uni-freiburg.de>
+! Adapted by Janus Weil <janus@gcc.gnu.org>
+
+module m
+
+ implicit none
+ private
+
+ public :: public_t
+
+ type :: private_t
+ integer :: i
+ end type
+
+ type :: public_t
+ type(private_t), pointer :: public_comp_with_private_type
+ procedure(ifc) , nopass, pointer :: ppc
+ end type
+
+ abstract interface
+ integer function ifc ()
+ end function
+ end interface
+
+end module m
+
+program test
+use m
+implicit none
+type(public_t) :: x
+integer :: j
+j = x%ppc()
+end
+
+! { dg-final { cleanup-modules "m" } }
+