Skip to content

Commit 692c047

Browse files
committed
Don't wrap bind(C) functions that have no defined return type
1 parent a75c13f commit 692c047

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Source/Modules/fortran.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,6 +1461,9 @@ Wrapper *FORTRAN::imfuncWrapper(Node *n, bool bindc) {
14611461

14621462
// Attach typemap for return value
14631463
String *return_imtype = attach_typemap(tmtype, n, warning_flag);
1464+
if (bindc && !return_imtype) {
1465+
return NULL;
1466+
}
14641467
this->replace_fclassname(n, return_cpptype, return_imtype);
14651468

14661469
const bool is_imsubroutine = (Len(return_imtype) == 0);

0 commit comments

Comments
 (0)