Commit 966e7f73 by Steven G. Kargl

re PR fortran/86587 (Derived-type with attributes BIND(C) and PRIVATE raises an…

re PR fortran/86587 (Derived-type with attributes BIND(C) and PRIVATE raises an error but standard accepts it)

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  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/86587
	* gfortran.dg/pr86587.f90: New test.

From-SVN: r272524
parent 145f748f
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> 2019-06-20 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/90937 PR fortran/90937
......
...@@ -4529,16 +4529,6 @@ verify_bind_c_derived_type (gfc_symbol *derived_sym) ...@@ -4529,16 +4529,6 @@ verify_bind_c_derived_type (gfc_symbol *derived_sym)
curr_comp = curr_comp->next; curr_comp = curr_comp->next;
} while (curr_comp != NULL); } 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) if (derived_sym->attr.sequence != 0)
{ {
gfc_error ("Derived type %qs at %L cannot have the SEQUENCE " 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> 2019-06-20 Iain Sandoe <iain@sandoe.co.uk>
* obj-c++.dg/stubify-1.mm: Adjust options and scan-asm checks. * obj-c++.dg/stubify-1.mm: Adjust options and scan-asm checks.
......
! { 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
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