News for hackers. Stuff that matters.
Re:Lfortran: Modern interactive LLVM-based Fortran compiler by pklausler on Tuesday August 29, 2023 @11:32AM (#37309424)
Fortran's standard doesn't use the term Undefined Behavior; instead, it states a requirement that an object modified via one dummy argument must not be modified or referenced via any other name. When a program violates that requirement, it's no longer conforming to the standard, and the language doesn't define what happens afterwards. In practice, you'll get bad results and a bad day of debugging.
Re:Lfortran: Modern interactive LLVM-based Fortran compiler by nextaccountic on Wednesday August 30, 2023 @03:45AM (#37318860)
> When a program violates that requirement, it's no longer conforming to the standard, and the language doesn't define what happens afterwards. In practice, you'll get bad results and a bad day of debugging.

This is just UB by another name

That's.. disappointing

Re:Lfortran: Modern interactive LLVM-based Fortran compiler by pklausler on Wednesday August 30, 2023 @11:53AM (#37324007)
Rewind your disappointed expectations back to Fortran II in the 1950's, the first Fortran with subprograms. The value proposition was this: if a programmer was willing to help the Fortran optimizer out by avoiding aliasing, the compiler would generate code that was usually fast enough to avoid the need to write in assembly. It was a great deal for the programmer at the time. Fortran succeeded not just because it allowed one to write more productively in a "high-level" language but because its compilers could optimize well enough that there was no significant performance cost to doing so. (And then its popularity allowed one to port Fortran code from one vendor's hardware to another.)