Comments (3)
You have to use --fast
, it still doesn't work as of 1b3204f:
$ lfortran a.f90
7.50000000000000000e+01 7.50000000000000000e+01
7.50000000000000000e+01 7.50000000000000000e+01
7.50000000000000000e+01 7.50000000000000000e+01
7.50000000000000000e+01 7.50000000000000000e+01
$ lfortran a.f90 --fast
7.50000000000000000e+01 7.50000000000000000e+01
7.50000000000000000e+01 7.50000000000000000e+01
2.12955623347515187e-314 2.12955623347515187e-314
2.12955623347515187e-314 2.12955623347515187e-314
from lfortran.
Thanks for the bug report! Indeed, there is some bug, here is a minimal example:
program main
implicit none
integer(kind=4), parameter :: m = 2
integer(kind=4) i, j
real(kind=8) :: mean = 75.0
real(kind=8) u(m, m)
real(kind=8) w(m, m)
w = mean
! fails
do j = 1, m
do i = 1, m
u(i,j) = w(i,j)
end do
end do
print *, w
print *, u
do j = 1, m
do i = 1, m
if (u(i,j) /= w(i,j)) error stop
end do
end do
end
This gives:
$ lfortran x.f90
7.50000000000000000e+01 7.50000000000000000e+01
7.50000000000000000e+01 7.50000000000000000e+01
7.50000000000000000e+01 7.50000000000000000e+01
7.50000000000000000e+01 7.50000000000000000e+01
$ lfortran x.f90 --fast
7.50000000000000000e+01 7.50000000000000000e+01
7.50000000000000000e+01 7.50000000000000000e+01
2.13924567501028306e-314 2.13924567501028306e-314
2.13924567501028306e-314 2.13924567501028306e-314
Note that the error condition failed as well, so there are two bugs.
from lfortran.
This now works well:
% lfortran a.f90
7.50000000000000000e+01 7.50000000000000000e+01
7.50000000000000000e+01 7.50000000000000000e+01
7.50000000000000000e+01 7.50000000000000000e+01
7.50000000000000000e+01 7.50000000000000000e+01
% gfortran a.f90 && ./a.out
ld: warning: ignoring duplicate libraries: '-lemutls_w', '-lgcc'
75.000000000000000 75.000000000000000 75.000000000000000 75.000000000000000
75.000000000000000 75.000000000000000 75.000000000000000 75.000000000000000
from lfortran.
Related Issues (20)
- Possible alternative syntax for {}
- Update travel example at dev.lfortran.org HOT 2
- Update travel example
- Generics: better error message for a missing requirement
- Cosine similarity benchmark
- segfault in string handling
- LLVM verify fails for string arrays HOT 2
- Implement quadruple precision
- Compiling stdlib special functions HOT 12
- Intrinsic index() function is returning wrong result HOT 1
- ENH: support `back` parameter for intrinsic `index` HOT 1
- ENH: Implement intrinsic `ANINT`
- ENH: Implement intrinsic `hypot`
- Complex `im`, `re` is not supported yet for assignment HOT 2
- Index is out of bounds
- BUG: `gamma` had to be renamed to `mgamma` HOT 1
- Major performance problem on a simple benchmark HOT 4
- error: ‘character_kinds’ does not name a type HOT 3
- LCompilersException: Unexpected token type 1, expected type 7 HOT 1
- Could NOT find StaticZSTD (missing: zstd_LIBRARY) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lfortran.