[doc,patch] Fortran compiler on Ultrix and clobbered registers

FX Coudert fxcoudert@gmail.com
Sun Apr 29 13:25:00 GMT 2007


I noted in the GCC docs (see for example http://gcc.gnu.org/ 
onlinedocs/gcc/Interoperation.html) that we have the following text  
in the section "Known Causes of Trouble with GCC":

> On Ultrix, the Fortran compiler expects registers 2 through 5 to be  
> saved by function calls. However, the C compiler uses conventions  
> compatible with BSD Unix: registers 2 through 5 may be clobbered by  
> function calls.
>
> GCC uses the same convention as the Ultrix C compiler. You can use  
> these options to produce code compatible with the Fortran compiler:
>           -fcall-saved-r2 -fcall-saved-r3 -fcall-saved-r4 -fcall- 
> saved-r5

That code was initially committed to gcc/gcc.texi in 1997 (it's now  
in gcc/doc/gcc.texi). As there have been a few changes on the  
compiler since that time, I wonder if it's still true, and still  
useful to have that comment there. As there is no ultrix maintainer  
(though it's still listed as a supported platform), I'm CCing the VAX  
maintainers: can you comment on the usefulness of this part of the doc?

So, unless someone can raise a reason against it, I'd like to propose  
the patch below to remove it. Built and tested on i686-linux (make  
info && make html). OK for mainline?

FX





Index: gcc/doc/trouble.texi
===================================================================
--- gcc/doc/trouble.texi        (revision 124144)
+++ gcc/doc/trouble.texi        (working copy)
@@ -234,20 +234,6 @@ you cannot successfully use @samp{$} in
to a restriction in the IBM assembler.  GAS supports these
identifiers.
-@cindex VAX calling convention
-@cindex Ultrix calling convention
-@item
-@opindex fcall-saved
-On Ultrix, the Fortran compiler expects registers 2 through 5 to be  
saved
-by function calls.  However, the C compiler uses conventions compatible
-with BSD Unix: registers 2 through 5 may be clobbered by function  
calls.
-
-GCC uses the same convention as the Ultrix C compiler.  You can use
-these options to produce code compatible with the Fortran compiler:
-
-@smallexample
--fcall-saved-r2 -fcall-saved-r3 -fcall-saved-r4 -fcall-saved-r5
-@end smallexample
@end itemize
@node Incompatibilities



More information about the Gcc-patches mailing list