This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components
- From: "pault at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Nov 2005 17:22:58 -0000
- Subject: [Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components
- References: <bug-24534-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from pault at gcc dot gnu dot org 2005-11-05 17:22 -------
>
> This is clearly nonsense. Although the type "my_t" is PUBLIC,
> its components are not.
>
No, this is not nonsense, just incorrect. See PR16404 and the discussion about
test #6.
I have incompletely applied the constraint.....
..... standard have a peculiar order, but the first constraint after R427 says:
"If a component of a derived type is of a ttype declared to be private, either
the derived type definition must contain the PRIVATE stement, or the derived
type must be private."
Therefore, the addition of sym->component_access != ACCESS_PRIVATE to the if
statement that produces the error and the addition of your testcase to the
testsuite fixes the problem (It's just now regtesting).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24534