@@ -1107,11 +1107,6 @@ class Fortran::lower::CallInterfaceImpl {
11071107 };
11081108 if (obj.attrs .test (Attrs::Optional))
11091109 addMLIRAttr (fir::getOptionalAttrName ());
1110- // Skipping obj.attrs.test(Attrs::Asynchronous), this does not impact the
1111- // way the argument is passed given flang implement asynch IO synchronously.
1112- // TODO: it would be safer to treat them as volatile because since Fortran
1113- // 2018 asynchronous can also be used for C defined asynchronous user
1114- // processes (see 18.10.4 Asynchronous communication).
11151110 if (obj.attrs .test (Attrs::Contiguous))
11161111 addMLIRAttr (fir::getContiguousAttrName ());
11171112 if (obj.attrs .test (Attrs::Value))
@@ -1120,6 +1115,12 @@ class Fortran::lower::CallInterfaceImpl {
11201115 TODO (loc, " VOLATILE in procedure interface" );
11211116 addMLIRAttr (fir::getVolatileAttrName ());
11221117 }
1118+ // obj.attrs.test(Attrs::Asynchronous) does not impact the way the argument
1119+ // is passed given flang implement asynch IO synchronously. However, it's
1120+ // added to determine whether the argument is captured.
1121+ // TODO: it would be safer to treat them as volatile because since Fortran
1122+ // 2018 asynchronous can also be used for C defined asynchronous user
1123+ // processes (see 18.10.4 Asynchronous communication).
11231124 if (obj.attrs .test (Attrs::Asynchronous))
11241125 addMLIRAttr (fir::getAsynchronousAttrName ());
11251126 if (obj.attrs .test (Attrs::Target))
0 commit comments