diff options
author | Tobias Burnus <tobias@codesourcery.com> | 2021-03-05 10:43:11 +0100 |
---|---|---|
committer | Tobias Burnus <tobias@codesourcery.com> | 2021-03-05 10:43:11 +0100 |
commit | 80cf2facbbdafed159b326d83f7cf3999c3df8d0 (patch) | |
tree | ef2c2535f84a930cbb080bce833026efae41cb84 /gcc/fortran/invoke.texi | |
parent | 8d240b3f0615a890d8bdd9319842601a48292522 (diff) | |
download | gcc-80cf2facbbdafed159b326d83f7cf3999c3df8d0.zip gcc-80cf2facbbdafed159b326d83f7cf3999c3df8d0.tar.gz gcc-80cf2facbbdafed159b326d83f7cf3999c3df8d0.tar.bz2 |
Fortran: Follow fixes to -freal-{4,8}-real* handling [PR99355,PR57871]
gcc/fortran/ChangeLog:
PR fortran/99355
PR fortran/57871
* invoke.texi (-freal{4,8}-real-*): Extend description.
* primary.c (match_real_constant): Also promote real literals
with '_kind' number.
gcc/testsuite/ChangeLog:
* gfortran.dg/real4-10-real8-10.f90: Add check for real literals
with '_kind' number.
* gfortran.dg/real4-10-real8-16.f90: Likewise.
* gfortran.dg/real4-10-real8-4.f90: Likewise.
* gfortran.dg/real4-10.f90: Likewise.
* gfortran.dg/real4-16-real8-10.f90: Likewise.
* gfortran.dg/real4-16-real8-16.f90: Likewise.
* gfortran.dg/real4-16-real8-4.f90: Likewise.
* gfortran.dg/real4-16.f90: Likewise.
* gfortran.dg/real4-8-real8-10.f90: Likewise.
* gfortran.dg/real4-8-real8-16.f90: Likewise.
* gfortran.dg/real4-8-real8-4.f90: Likewise.
* gfortran.dg/real4-8.f90: Likewise.
* gfortran.dg/real8-10.f90: Likewise.
* gfortran.dg/real8-16.f90: Likewise.
* gfortran.dg/real8-4.f90: Likewise.
Diffstat (limited to 'gcc/fortran/invoke.texi')
-rw-r--r-- | gcc/fortran/invoke.texi | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi index 3f3ae5a..0fb7e1a 100644 --- a/gcc/fortran/invoke.texi +++ b/gcc/fortran/invoke.texi @@ -520,13 +520,24 @@ representation of the translated Fortran code, produced by @cindex options, real kind type promotion Promote all @code{REAL(KIND=M)} entities to @code{REAL(KIND=N)} entities. If @code{REAL(KIND=N)} is unavailable, then an error will be issued. -All other real kind types are unaffected by this option. +The @code{-freal-4-} flags also affect the default real kind and the +@code{-freal-8-} flags also the double-precision real kind. All other +real-kind types are unaffected by this option. The promotion is also +applied to real literal constants of default and double-precision kind +and a specified kind number of 4 or 8, respectively. +However, @code{-fdefault-real-8}, @code{-fdefault-real-10}, +@code{-fdefault-real-10}, and @code{-fdefault-double-8} take precedence +for the default and double-precision real kinds, both for real literal +constants and for declarations without a kind number. +Note that for @code{REAL(KIND=KIND(1.0))} the literal may get promoted and +then the result may get promoted again. These options should be used with care and may not be suitable for your codes. Areas of possible concern include calls to external procedures, alignment in @code{EQUIVALENCE} and/or @code{COMMON}, generic interfaces, -BOZ literal constant conversion, and I/O. Inspection of the intermediate -representation of the translated Fortran code, produced by -@option{-fdump-tree-original}, is suggested. +BOZ literal constant conversion, and I/O and calls to intrinsic procedures +when passing a value to the @code{kind=} dummy argument. Inspection of the +intermediate representation of the translated Fortran code, produced by +@option{-fdump-fortran-original} or @option{-fdump-tree-original}, is suggested. @item -std=@var{std} @opindex @code{std=}@var{std} option |