@@ -1133,9 +1133,7 @@ int FORTRAN::functionWrapper(Node *n) {
1133
1133
1134
1134
// >>> GENERATE CODE FOR MODULE INTERFACE
1135
1135
1136
- if (GetFlag (n, " fortran:private" )) {
1137
- // Hidden function (currently, only constructors that become module procedures)
1138
- } else if (member) {
1136
+ if (member) {
1139
1137
// Wrapping a member function
1140
1138
ASSERT_OR_PRINT_NODE (!this ->is_bindc_struct (), n);
1141
1139
ASSERT_OR_PRINT_NODE (f_class, n);
@@ -1144,7 +1142,7 @@ int FORTRAN::functionWrapper(Node *n) {
1144
1142
1145
1143
String *qualifiers = NewStringEmpty ();
1146
1144
1147
- if (generic) {
1145
+ if (generic || GetFlag (n, " fortran:private " ) ) {
1148
1146
Append (qualifiers, " , private" );
1149
1147
}
1150
1148
if (String *extra_quals = Getattr (n, " fortran:procedure" )) {
@@ -1169,6 +1167,8 @@ int FORTRAN::functionWrapper(Node *n) {
1169
1167
// Declare a private procedure
1170
1168
Printv (f_class, fname, " \n " , NULL );
1171
1169
}
1170
+ } else if (GetFlag (n, " fortran:private" )) {
1171
+ /* Don't write the public accessor */
1172
1172
} else if (fsymname) {
1173
1173
// The module function name is aliased, and perhaps overloaded.
1174
1174
// Append this function name to the list of overloaded names
0 commit comments