[flang-commits] [flang] [flang] Silence errors on C_LOC/C_FUNLOC in specification expressions (PR #96108)

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Wed Jun 19 17:19:33 PDT 2024


================
@@ -182,7 +182,10 @@
     __builtin_c_ptr_ne = x%__address /= y%__address
   end function
 
-  function __builtin_c_funloc(x)
+  ! Semantics has some special-case code that allows c_funloc()
+  ! to appear in a specification expression and exempts it
+  ! from the requirement that "x" be a pure dummy procedure.
+  pure function __builtin_c_funloc(x)
----------------
klausler wrote:

It would still be accepted, and there's no good reason for it not to be that I can think of.  A procedure that implements the interface of `c_funloc` is not going to be able to do much mischief beyond what can be done by `c_funloc`.

https://github.com/llvm/llvm-project/pull/96108


More information about the flang-commits mailing list