diff options
author | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-05-19 08:22:41 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2019-05-19 08:22:41 +0000 |
commit | 14688b8de389740f07079a945edf887a682fc9d1 (patch) | |
tree | 82fc78b1edd586b165fb22d31a16cbda45a475ff /gcc/fortran/invoke.texi | |
parent | f12b0a62268cc6a1ef613e09c2b93109ac191f0e (diff) | |
download | gcc-14688b8de389740f07079a945edf887a682fc9d1.zip gcc-14688b8de389740f07079a945edf887a682fc9d1.tar.gz gcc-14688b8de389740f07079a945edf887a682fc9d1.tar.bz2 |
re PR fortran/90329 (Incompatibility between gfortran and C lapack calls)
2019-05-19 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/90329
* invoke.texi: Document -fbroken-callers.
* lang.opt: Add -fbroken-callers.
* trans-decl.c (create_function_arglist): Only set
DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.
From-SVN: r271376
Diffstat (limited to 'gcc/fortran/invoke.texi')
-rw-r--r-- | gcc/fortran/invoke.texi | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index efc7aea..ec3b040 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -181,7 +181,7 @@ and warnings}. @item Code Generation Options @xref{Code Gen Options,,Options for code generation conventions}. @gccoptlist{-faggressive-function-elimination -fblas-matmul-limit=@var{n} @gol --fbounds-check -fcheck-array-temporaries @gol +-fbounds-check -fbroken-callers -fcheck-array-temporaries @gol -fcheck=@var{<all|array-temps|bounds|do|mem|pointer|recursion>} @gol -fcoarray=@var{<none|single|lib>} -fexternal-blas -ff2c -ffrontend-loop-interchange @gol @@ -1617,6 +1617,34 @@ warnings for generated array temporaries. @c Note: This option is also referred in gcc's manpage Deprecated alias for @option{-fcheck=bounds}. +@item -fbroken-callers +@opindex @code{broken-callers} +Some C interfaces to Fortran codes violate the gfortran ABI by +omitting the hidden character length arguments as described in +@xref{Argument passing conventions}. This can lead to crashes +because pushing arguments for tail calls can overflow the stack. + +To provide a workaround for existing binary packages, this option +disables tail call optimization for gfortran procedures with character +arguments. + +Using this option can lead to problems including crashes due to +insufficient stack space. + +It is @emph{very strongly} recommended to fix the code in question. +The @option{-fc-prototypes-external} option can be used to generate +prototypes which conform to gfortran's ABI, for inclusion in the +source code. + +Support for this option will likely be withdrawn in a future release +of gfortran. + +The negative form, @option{-fno-broken-callers}, can be used to +disable this option. + +Default is currently @option{-fbroken-callers}, this will change +in future releases. + @item -fcheck-array-temporaries @opindex @code{fcheck-array-temporaries} Deprecated alias for @option{-fcheck=array-temps}. |