------- Comment #3 from burnus at gcc dot gnu dot org 2007-04-11 09:44 ------- Fortran 95 ---------- 4.4.1 Derived-type definition TYPE [ [ , access-spec ] :: ] type-name [ private-sequence-stmt ] ! no PUBLIC!
access spec & PRIVATE statement only in specification part of a module. 5.1 Type declaration statements / 5.1.2.2 Accessibility attribute type-spec, access-spec :: ... only in specification part of a module 5.2.3 Accessibility statements access-spec [ [ :: ] access-id-list ] only in specification part of a module. Fortran 2003 ------------ 4.5.1 Derived-type definition TYPE access-spec :: type-name PRIVATE ! statement; no PUBLIC declaration-type-spec [[,component-attr-spec-list]::]component-decl-list with "component-attr-spec" is [...] or "access-spec". Difference F95/F2003: - components of a derived-type may have access-spec attributes - Note that the PUBLIC statement and and the "PRIVATE [::] access-id-list" statement (but not "PRIVATE" w/o access-id-list) is not allowed in a derived-type declaration. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31472