+2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/86587
+ * symbol.c (verify_bind_c_derived_type): Remove erroneous error
+ checking for BIND(C) and PRIVATE attributes.
+
2019-06-20 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/90937
curr_comp = curr_comp->next;
} while (curr_comp != NULL);
-
- /* Make sure we don't have conflicts with the attributes. */
- if (derived_sym->attr.access == ACCESS_PRIVATE)
- {
- gfc_error ("Derived type %qs at %L cannot be declared with both "
- "PRIVATE and BIND(C) attributes", derived_sym->name,
- &(derived_sym->declared_at));
- retval = false;
- }
-
if (derived_sym->attr.sequence != 0)
{
gfc_error ("Derived type %qs at %L cannot have the SEQUENCE "
+2019-06-20 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/86587
+ * gfortran.dg/pr86587.f90: New test.
+
2019-06-20 Iain Sandoe <iain@sandoe.co.uk>
* obj-c++.dg/stubify-1.mm: Adjust options and scan-asm checks.
--- /dev/null
+! { dg-do compile }
+! PR fortran/86587
+! Code contirubted by Valentin Clement <valentin.clement at env dot ethz dot ch>
+!
+module mod1
+ use iso_c_binding
+ type, bind(c), private :: mytype
+ integer(c_int) :: i1, i2
+ end type
+end module mod1
+
+module mod2
+ use iso_c_binding
+ private
+ type, bind(c) :: mytype
+ integer(c_int) :: i1, i2
+ end type
+end module mod2