This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/24534] [4.0/4.1 Regression] PUBLIC derived types with private components



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]