Just looking at the Fortran 2018 spec, section 11.4, “STOP and ERROR
STOP statements”. Paragraph 2 says:
When an image is terminated by a STOP or ERROR STOP statement,
its stop code, if any, is made available in a processor-dependent
manner. If the stop-code is an integer, it is recommended that the
value be used as the process exit status, if the processor
supports that concept. If the stop-code in a STOP statement is of
type character or does not appear, or if an end-program-stmt is
executed, it is recommended that the value zero be supplied as the
process exit status, if the processor supports that concept. If
the stop-code in an ERROR STOP statement is of type character or
does not appear, it is recommended that a processor-dependent
nonzero value be supplied as the process exit status, if the
processor supports that concept.
But on VMS, the usual success status code is 1, with other odd values indicating varying degrees of success, while even values (including
zero) indicate warnings or errors. So how does that work?
4) Reality is pretty simple:
$ type Z1.for
program z1
end
$ for Z1
$ link Z1
$ run Z1
$ sh symb $status
$STATUS == "%X00000001"
$ type Z2.for
program z2
stop
end
$ for Z2
$ link Z2
$ run Z2
$ sh symb $status
$STATUS == "%X00000001"
$ type Z3.for
program z3
stop 44
end
$ for Z3
$ link Z3
$ run Z3
44
$ sh symb $status
$STATUS == "%X00000001"
$ type Z4.for
program z4
stop 'Bingo'
end
$ for Z4
$ link Z4
$ run Z4
Bingo
$ sh symb $status
$STATUS == "%X00000001"
$ type Z5.for
program z5
call sys$exit(%val(44))
end
$ for Z5
$ link Z5
$ run Z5
%SYSTEM-F-ABORT, abort
$ sh symb $status
$STATUS == "%X0000002C"
On Sun, 25 Feb 2024 19:37:55 -0500, Arne Vajhøj wrote:
2) VMS Fortran is not Fortran 2018 - it is Fortran 95.
Really?? Why?
2) VMS Fortran is not Fortran 2018 - it is Fortran 95.
On Sun, 25 Feb 2024 19:37:55 -0500, Arne Vajhøj wrote:
2) VMS Fortran is not Fortran 2018 - it is Fortran 95.
Really?? Why?
I don't know if that is what VSI will do, but it sounds like a relative
easy path. They have LLVM and clang running,
so adding a standard flang frontend should not be that difficult.
2) VMS Fortran is not Fortran 2018 - it is Fortran 95.
Really?? Why?
Because engineers should never, ever be allowed to use pointers.
Fortran 95 is already going too far.
On Sun, 25 Feb 2024 20:48:06 -0500, Arne Vajhøj wrote:
I don't know if that is what VSI will do, but it sounds like a relative
easy path. They have LLVM and clang running,
so adding a standard flang frontend should not be that difficult.
Looking around, I came across this <https://www.linaro.org/blog/comparing-llvm-flang-with-other-fortran-compilers/>,
from just a few months ago. Seems there is “Classic Flang” and “LLVM Flang”: the latter is an all-new compiler, but its performance is not
there yet.
Also looks like Gfortran is roughly as good as “Classic Flang”, if not better than it in some places.
Which Flang will VSI be using?
Historically VMS Fortran was famous for its extensions and perhaps also non-standard behaviour. Does Flang includes support for the extensions?
Just looking at the Fortran 2018 spec, section 11.4, “STOP and ERROR
STOP statements”. Paragraph 2 says:
When an image is terminated by a STOP or ERROR STOP statement,
its stop code, if any, is made available in a processor-dependent
manner. If the stop-code is an integer, it is recommended that the
value be used as the process exit status, if the processor
supports that concept. If the stop-code in a STOP statement is of
type character or does not appear, or if an end-program-stmt is
executed, it is recommended that the value zero be supplied as the
process exit status, if the processor supports that concept. If
the stop-code in an ERROR STOP statement is of type character or
does not appear, it is recommended that a processor-dependent
nonzero value be supplied as the process exit status, if the
processor supports that concept.
But on VMS, the usual success status code is 1, with other odd values indicating varying degrees of success, while even values (including
zero) indicate warnings or errors. So how does that work?
GFortran on the other hand support some of it.
https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html
And if you think that "just swap in the Linux kernel" idea you've been floating won't hit this status difference and myriad other details,
you're headed for a surprise.
On 2/26/2024 4:35 PM, Lawrence D'Oliveiro wrote:
On Mon, 26 Feb 2024 16:00:25 -0500, Arne Vajhøj wrote:
GFortran on the other hand support some of it.
https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html
That’s another thing that would have been available for free, if the
VMS port had been based on Linux.
They got a lot more for free by reusing the existing frontend.
On Mon, 26 Feb 2024 16:00:25 -0500, Arne Vajhøj wrote:
GFortran on the other hand support some of it.
https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html
That’s another thing that would have been available for free, if the VMS port had been based on Linux.
On Mon, 26 Feb 2024 19:17:42 -0500, Arne Vajhøj wrote:
On 2/26/2024 4:35 PM, Lawrence D'Oliveiro wrote:
On Mon, 26 Feb 2024 16:00:25 -0500, Arne Vajhøj wrote:
GFortran on the other hand support some of it.
https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html
That’s another thing that would have been available for free, if the
VMS port had been based on Linux.
They got a lot more for free by reusing the existing frontend.
But not the traditional VMS extensions?
On 2/26/2024 7:53 PM, Lawrence D'Oliveiro wrote:
On Mon, 26 Feb 2024 19:17:42 -0500, Arne Vajhøj wrote:
On 2/26/2024 4:35 PM, Lawrence D'Oliveiro wrote:
On Mon, 26 Feb 2024 16:00:25 -0500, Arne Vajhøj wrote:
GFortran on the other hand support some of it.
https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html
That’s another thing that would have been available for free, if the >>>> VMS port had been based on Linux.
They got a lot more for free by reusing the existing frontend.
But not the traditional VMS extensions?
They got those.
Same frontend => same dialect supported.
On Mon, 26 Feb 2024 20:03:40 -0500, Arne Vajhøj wrote:
On 2/26/2024 7:53 PM, Lawrence D'Oliveiro wrote:
On Mon, 26 Feb 2024 19:17:42 -0500, Arne Vajhøj wrote:
On 2/26/2024 4:35 PM, Lawrence D'Oliveiro wrote:
On Mon, 26 Feb 2024 16:00:25 -0500, Arne Vajhøj wrote:
That’s another thing that would have been available for free, if the >>>>> VMS port had been based on Linux.
GFortran on the other hand support some of it.
https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html >>>>>
They got a lot more for free by reusing the existing frontend.
But not the traditional VMS extensions?
They got those.
Same frontend => same dialect supported.
I thought you said Flang “apparently does not support” VMS extensions.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 405 |
Nodes: | 16 (3 / 13) |
Uptime: | 53:37:14 |
Calls: | 8,499 |
Files: | 13,203 |
Messages: | 5,917,100 |