Estado del desarrollo de LFortran¶
This page documents what Fortran features are supported by LFortran. For each feature we list a short description, the filename with the test and current status for each parts of the compiler:
AST: The code can be parsed to AST (
lfortran --show-ast test.f90
)ASR: The code can be transformed to ASR (
lfortran --show-asr test.f90
)LLVM: LFortran can generate LLVM IR (
lfortran --show-llvm test.f90
)BIN: The LLVM IR can compile to a binary
RUN: The binary runs without errors
If all are green it means the feature fully works and you can use it in your codes. Otherwise you can see what the status is of each feature.
This page is generated automatically using the Compiler Tester repository which contains all the Fortran tests and scripts to run LFortran to produce the tables below. We are looking for contributors to contribute more tests. Our goal is to have a comprehensive Fortran testsuite that can be used to test any Fortran compiler.
Testing the LFortran compiler version:
$ lfortran --version
LFortran version: 0.12.0-491-gaf48ff273
Platform: macOS
Default target: x86_64-apple-darwin20.3.0
Topics¶
Full programs that compute something interesting¶
Basic Numerics¶
Directory: tests/programs/numerics
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
Modules¶
Basic Usage¶
Directory: tests/modules/basic
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
Module Functions and Subroutines¶
Directory: tests/modules/procedures
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
Expressions¶
Arithmetic Operations¶
Directory: tests/expressions/arit
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
Integers¶
Directory: tests/expressions/integers
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
Real Numbers¶
Directory: tests/expressions/reals
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
❌ |
❌ |
❌ |
❌ |
Complex Numbers¶
Directory: tests/expressions/complex
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
Strings¶
Directory: tests/expressions/character
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
Derived Types¶
Directory: tests/expressions/derived_type
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
Statements¶
Allocate Statement¶
Directory: tests/statements/allocate
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
Block Statement¶
Directory: tests/statements/block
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
❌ |
❌ |
❌ |
❌ |
Goto Statement¶
Directory: tests/statements/goto
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
❌ |
❌ |
❌ |
❌ |
|
|
✅ |
❌ |
❌ |
❌ |
❌ |
If Statement¶
Directory: tests/statements/if
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
While Statement¶
Directory: tests/statements/while
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
Print Statement¶
Directory: tests/statements/print
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
Open, Read, Write, Close Statement¶
Directory: tests/statements/file_io
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
❌ |
❌ |
❌ |
Intrinsic Functions¶
abs¶
Directory: tests/intrinsic/abs
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
❌ |
❌ |
❌ |
❌ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
exp¶
Directory: tests/intrinsic/exp
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
log¶
Directory: tests/intrinsic/log
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
sqrt¶
Directory: tests/intrinsic/sqrt
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
❌ |
❌ |
❌ |
❌ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
sin¶
Directory: tests/intrinsic/sin
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
❌ |
❌ |
❌ |
❌ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
cos¶
Directory: tests/intrinsic/cos
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
tan¶
Directory: tests/intrinsic/tan
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
sinh¶
Directory: tests/intrinsic/sinh
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
cosh¶
Directory: tests/intrinsic/cosh
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
tanh¶
Directory: tests/intrinsic/tanh
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
asin¶
Directory: tests/intrinsic/asin
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
acos¶
Directory: tests/intrinsic/acos
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
atan¶
Directory: tests/intrinsic/atan
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
✅ |
✅ |
✅ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
modulo¶
Directory: tests/intrinsic/modulo
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
❌ |
❌ |
❌ |
❌ |
|
|
✅ |
✅ |
❌ |
❌ |
❌ |
mod¶
Directory: tests/intrinsic/mod
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
❌ |
❌ |
❌ |
❌ |
|
|
✅ |
❌ |
❌ |
❌ |
❌ |
min¶
Directory: tests/intrinsic/min
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
❌ |
❌ |
❌ |
max¶
Directory: tests/intrinsic/max
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
❌ |
❌ |
❌ |
int¶
Directory: tests/intrinsic/int
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
❌ |
❌ |
❌ |
❌ |
real¶
Directory: tests/intrinsic/real
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
✅ |
✅ |
✅ |
✅ |
floor¶
Directory: tests/intrinsic/floor
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
❌ |
❌ |
❌ |
❌ |
nint¶
Directory: tests/intrinsic/nint
Descripción |
AST |
ASR |
LLVM |
BIN |
RUN |
Filename |
---|---|---|---|---|---|---|
|
✅ |
❌ |
❌ |
❌ |
❌ |