[flang] [llvm] [flang] Implement FSEEK and FTELL (PR #133003)
Peter Klausler via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 26 17:54:09 PDT 2025
================
@@ -1128,6 +1128,41 @@ program chdir_func
end program chdir_func
```
+### Non-Standard Intrinsics: FSEEK and FTELL
+
+#### Description
+`FSEEK(UNIT, OFFSET, WHENCE)` Sets position in file opened as `UNIT`, returns status.
+
+`CALL FSEEK(UNIT, OFFSET, WHENCE[, STATUS])` Sets position, returns any error in `STATUS` if present.
+
+`FTELL(UNIT)` Returns current absolute byte offset.
+
+`CALL FTELL(UNIT, OFFSET)` Set `OFFSET` to current byte offset in file.
+
+These intrinsic procedures are available as both functions and subroutines,
+but both forms cannot be used in the same scope.
+
+| | |
----------------
klausler wrote:
I actually defined it as returning a 64-bit integer.
https://github.com/llvm/llvm-project/pull/133003
More information about the llvm-commits
mailing list