[flang-commits] [flang] e248f0d - [Flang] Update Extensions.md for supported BIND(C) LOGICAL kind. (#88159)

via flang-commits flang-commits at lists.llvm.org
Tue Apr 9 12:05:17 PDT 2024


Author: Daniel Chen
Date: 2024-04-09T15:05:12-04:00
New Revision: e248f0df14e407b8ae98cd31fb2e77fc058f3c7e

URL: https://github.com/llvm/llvm-project/commit/e248f0df14e407b8ae98cd31fb2e77fc058f3c7e
DIFF: https://github.com/llvm/llvm-project/commit/e248f0df14e407b8ae98cd31fb2e77fc058f3c7e.diff

LOG: [Flang] Update Extensions.md for supported BIND(C) LOGICAL kind. (#88159)

Flang also supports non-scalar logical dummy argument with a different
KIND from C_BOOL to a bind(c) routine as well as a component in a
bind(c) derived type. Update the document.

```
subroutine sub(arg)
logical(4) :: arg(4)
end
```

```
type dt
logical(4) :: comp
end type
end
```

Added: 
    

Modified: 
    flang/docs/Extensions.md

Removed: 
    


################################################################################
diff  --git a/flang/docs/Extensions.md b/flang/docs/Extensions.md
index 4c3847291a3f3b..9030207d9bda5d 100644
--- a/flang/docs/Extensions.md
+++ b/flang/docs/Extensions.md
@@ -308,9 +308,10 @@ end
   enforce it and the constraint is not necessary for a correct
   implementation.
 * A label may follow a semicolon in fixed form source.
-* A scalar logical dummy argument to a `BIND(C)` procedure does
-  not have to have `KIND=C_BOOL` since it can be converted to/from
-  `_Bool` without loss of information.
+* A logical dummy argument to a `BIND(C)` procedure, or a logical
+  component to a `BIND(C)` derived type does not have to have
+  `KIND=C_BOOL` since it can be converted to/from `_Bool` without
+  loss of information.
 * The character length of the `SOURCE=` or `MOLD=` in `ALLOCATE`
   may be distinct from the constant character length, if any,
   of an allocated object.


        


More information about the flang-commits mailing list