https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57871

--- Comment #12 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> As this issue is about documentation, if I read the later comments correctly:
> Can you check whether the documentation is now sufficient or whether more is 
> needed? > If so, what is needed? — If not, can this bug now be closed?

I don't like the sentence

Note that for @code{REAL(KIND=KIND(1.0))} the literal may get promoted and
then the result may get promoted again.

There is only one promotion for -freal-4-real-X, and it does not matter if
1.0 is promoted first KIND(1.0) is then X, or after KIND(1.0) is 4 then 
REAL(KIND=4) is promoted to REAL(KIND=X).

The situation for SELECTED_REAL_KIND(1) is quite different: if the promotion of
-freal-4-real-X is done first, then the smallest kind available is 8,
if it is done after then SELECTED_REAL_KIND(1) will be 4, then promoted to X.

What about a sentence such as:

Note that while @code{REAL(KIND=KIND(1.0))} is always promoted to X by
-freal-4-real-X, @code{SELECTED_REAL_KIND(1)} returns always 4 which is then
promoted to X.

?

It may be also useful to add a sentence saying that the promotion options are
provided as such and that the observed behavior is not a bug but a feature.

As said in comment 8, I did not find any other circonstance, by
SELECTED_REAL_KIND
for which such ambiguity exists.

Reply via email to