public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, fortran] PR 52884 - double precision constants promoted to 16 byte by -fdefault-real-8
@ 2019-01-27 16:48 Dominique d'Humières
  2019-01-30 15:58 ` Dominique d'Humières
  0 siblings, 1 reply; 2+ messages in thread
From: Dominique d'Humières @ 2019-01-27 16:48 UTC (permalink / raw)
  To: Jerry DeLisle; +Cc: gfortran, gcc-patches

Hi,

The following patch is an update of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52884#c3, 
I am planning to commit with a suitable ChangeLog if there is no objection. Tested on darwin.

TIA

Dominique

--- ../_clean/gcc/fortran/invoke.texi	2019-01-19 22:48:32.000000000 +0100
+++ gcc/fortran/invoke.texi	2019-01-27 15:06:11.000000000 +0100
@@ -416,36 +416,45 @@ kind declaration.
 
 @item -fdefault-real-8
 @opindex @code{fdefault-real-8}
-Set the default real type to an 8 byte wide type. This option also affects
-the kind of non-double real constants like @code{1.0}, and does promote
-the default width of @code{DOUBLE PRECISION} to 16 bytes if possible, unless
-@code{-fdefault-double-8} is given, too. Unlike @option{-freal-4-real-8},
-it does not promote variables with explicit kind declaration.
+Set the default real type to an 8 byte wide type.  This option also affects
+the kind of non-double real constants like @code{1.0}.  This option promotes
+the default width of @code{DOUBLE PRECISION} and double real constants
+like @code{1.d0} to 16 bytes if possible.  If @code{-fdefault-double-8}
+is given along with @code{fdefault-real-8}, @code{DOUBLE PRECISION}
+and double real constants are not promoted.  Unlike @option{-freal-4-real-8},
+@code{fdefault-real-8} does not promote variables with explicit kind
+declarations.
 
 @item -fdefault-real-10
 @opindex @code{fdefault-real-10}
-Set the default real type to a 10 byte wide type. This option also affects
-the kind of non-double real constants like @code{1.0}, and does promote
-the default width of @code{DOUBLE PRECISION} to 16 bytes if possible, unless
-@code{-fdefault-double-8} is given. Unlike @option{-freal-4-real-10},
-it does not promote variables with explicit kind declaration.
+Set the default real type to an 10 byte wide type.  This option also affects
+the kind of non-double real constants like @code{1.0}.  This option promotes
+the default width of @code{DOUBLE PRECISION} and double real constants
+like @code{1.d0} to 16 bytes if possible.  If @code{-fdefault-double-8}
+is given along with @code{fdefault-real-10}, @code{DOUBLE PRECISION}
+and double real constants are not promoted.  Unlike @option{-freal-4-real-10},
+@code{fdefault-real-10} does not promote variables with explicit kind
+declarations.
 
 @item -fdefault-real-16
 @opindex @code{fdefault-real-16}
-Set the default real type to a 16 byte wide type. This option also affects
-the kind of non-double real constants like @code{1.0}, and does promote
-the default width of @code{DOUBLE PRECISION} to 16 bytes if possible, unless
-@code{-fdefault-double-8} is given. Unlike @option{-freal-4-real-16},
-it does not promote variables with explicit kind declaration.
+Set the default real type to an 16 byte wide type.  This option also affects
+the kind of non-double real constants like @code{1.0}.  This option promotes
+the default width of @code{DOUBLE PRECISION} and double real constants
+like @code{1.d0} to 16 bytes if possible.  If @code{-fdefault-double-8}
+is given along with @code{fdefault-real-16}, @code{DOUBLE PRECISION}
+and double real constants are not promoted.  Unlike @option{-freal-4-real-16},
+@code{fdefault-real-16} does not promote variables with explicit kind
+declarations.
 
 @item -fdefault-double-8
 @opindex @code{fdefault-double-8}
-Set the @code{DOUBLE PRECISION} type to an 8 byte wide type.  Do nothing if this
-is already the default.  If @option{-fdefault-real-8} is given,
-@code{DOUBLE PRECISION} would instead be promoted to 16 bytes if possible, and
-@option{-fdefault-double-8} can be used to prevent this.  The kind of real
-constants like @code{1.d0} will not be changed by @option{-fdefault-real-8}
-though, so also @option{-fdefault-double-8} does not affect it.
+Set the @code{DOUBLE PRECISION} type and double real constants
+like @code{1.d0} to an 8 byte wide type.  Do nothing if this
+is already the default.  This option prevents @option{-fdefault-real-8},
+@option{-fdefault-real-10}, and @option{-fdefault-real-16},
+from promoting @code{DOUBLE PRECISION} and double real constants like
+@code{1.d0} to 16 bytes.
 
 @item -finteger-4-integer-8
 @opindex @code{finteger-4-integer-8}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH, fortran] PR 52884 - double precision constants promoted to 16 byte by -fdefault-real-8
  2019-01-27 16:48 [PATCH, fortran] PR 52884 - double precision constants promoted to 16 byte by -fdefault-real-8 Dominique d'Humières
@ 2019-01-30 15:58 ` Dominique d'Humières
  0 siblings, 0 replies; 2+ messages in thread
From: Dominique d'Humières @ 2019-01-30 15:58 UTC (permalink / raw)
  To: jvdelisle; +Cc: gfortran, gcc-patches

No objection, so committed as revision r268396 with the ChangeLog

2019-01-30  Dominique d'Humieres  <dominiq@gcc.gnu.org


	PR fortran/52884
	* invoke.texi: Document the promotion of double precision
	constants.

Dominique

> Le 27 janv. 2019 à 15:19, Dominique d'Humières <dominiq@lps.ens.fr> a écrit :
> 
> Hi,
> 
> The following patch is an update of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52884#c3, 
> I am planning to commit with a suitable ChangeLog if there is no objection. Tested on darwin.
> 
> TIA
> 
> Dominique
> 
> --- ../_clean/gcc/fortran/invoke.texi	2019-01-19 22:48:32.000000000 +0100
> +++ gcc/fortran/invoke.texi	2019-01-27 15:06:11.000000000 +0100
> @@ -416,36 +416,45 @@ kind declaration.
> 
> @item -fdefault-real-8
> @opindex @code{fdefault-real-8}
> -Set the default real type to an 8 byte wide type. This option also affects
> -the kind of non-double real constants like @code{1.0}, and does promote
> -the default width of @code{DOUBLE PRECISION} to 16 bytes if possible, unless
> -@code{-fdefault-double-8} is given, too. Unlike @option{-freal-4-real-8},
> -it does not promote variables with explicit kind declaration.
> +Set the default real type to an 8 byte wide type.  This option also affects
> +the kind of non-double real constants like @code{1.0}.  This option promotes
> +the default width of @code{DOUBLE PRECISION} and double real constants
> +like @code{1.d0} to 16 bytes if possible.  If @code{-fdefault-double-8}
> +is given along with @code{fdefault-real-8}, @code{DOUBLE PRECISION}
> +and double real constants are not promoted.  Unlike @option{-freal-4-real-8},
> +@code{fdefault-real-8} does not promote variables with explicit kind
> +declarations.
> 
> @item -fdefault-real-10
> @opindex @code{fdefault-real-10}
> -Set the default real type to a 10 byte wide type. This option also affects
> -the kind of non-double real constants like @code{1.0}, and does promote
> -the default width of @code{DOUBLE PRECISION} to 16 bytes if possible, unless
> -@code{-fdefault-double-8} is given. Unlike @option{-freal-4-real-10},
> -it does not promote variables with explicit kind declaration.
> +Set the default real type to an 10 byte wide type.  This option also affects
> +the kind of non-double real constants like @code{1.0}.  This option promotes
> +the default width of @code{DOUBLE PRECISION} and double real constants
> +like @code{1.d0} to 16 bytes if possible.  If @code{-fdefault-double-8}
> +is given along with @code{fdefault-real-10}, @code{DOUBLE PRECISION}
> +and double real constants are not promoted.  Unlike @option{-freal-4-real-10},
> +@code{fdefault-real-10} does not promote variables with explicit kind
> +declarations.
> 
> @item -fdefault-real-16
> @opindex @code{fdefault-real-16}
> -Set the default real type to a 16 byte wide type. This option also affects
> -the kind of non-double real constants like @code{1.0}, and does promote
> -the default width of @code{DOUBLE PRECISION} to 16 bytes if possible, unless
> -@code{-fdefault-double-8} is given. Unlike @option{-freal-4-real-16},
> -it does not promote variables with explicit kind declaration.
> +Set the default real type to an 16 byte wide type.  This option also affects
> +the kind of non-double real constants like @code{1.0}.  This option promotes
> +the default width of @code{DOUBLE PRECISION} and double real constants
> +like @code{1.d0} to 16 bytes if possible.  If @code{-fdefault-double-8}
> +is given along with @code{fdefault-real-16}, @code{DOUBLE PRECISION}
> +and double real constants are not promoted.  Unlike @option{-freal-4-real-16},
> +@code{fdefault-real-16} does not promote variables with explicit kind
> +declarations.
> 
> @item -fdefault-double-8
> @opindex @code{fdefault-double-8}
> -Set the @code{DOUBLE PRECISION} type to an 8 byte wide type.  Do nothing if this
> -is already the default.  If @option{-fdefault-real-8} is given,
> -@code{DOUBLE PRECISION} would instead be promoted to 16 bytes if possible, and
> -@option{-fdefault-double-8} can be used to prevent this.  The kind of real
> -constants like @code{1.d0} will not be changed by @option{-fdefault-real-8}
> -though, so also @option{-fdefault-double-8} does not affect it.
> +Set the @code{DOUBLE PRECISION} type and double real constants
> +like @code{1.d0} to an 8 byte wide type.  Do nothing if this
> +is already the default.  This option prevents @option{-fdefault-real-8},
> +@option{-fdefault-real-10}, and @option{-fdefault-real-16},
> +from promoting @code{DOUBLE PRECISION} and double real constants like
> +@code{1.d0} to 16 bytes.
> 
> @item -finteger-4-integer-8
> @opindex @code{finteger-4-integer-8}
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-30 15:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-27 16:48 [PATCH, fortran] PR 52884 - double precision constants promoted to 16 byte by -fdefault-real-8 Dominique d'Humières
2019-01-30 15:58 ` Dominique d'Humières

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).