public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/97017] New: The function determine_precision is called twice for each formatted real write
@ 2020-09-11 3:13 jvdelisle at charter dot net
2020-10-05 20:37 ` [Bug libfortran/97017] " dominiq at lps dot ens.fr
2023-10-13 20:19 ` jvdelisle at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: jvdelisle at charter dot net @ 2020-09-11 3:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97017
Bug ID: 97017
Summary: The function determine_precision is called twice for
each formatted real write
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jvdelisle at charter dot net
Target Milestone: ---
I discovered this while working on the EX formattting feature. The
determine_precision function is called by both get_precision and inside the
macro FORMAT_FLOAT used by get_float_string.
To me this implies we have something factored wrong as we should not have to
call it twice to get things done. (a small performance issue as well as
obscure)
A simple test case will show the issue in a debugger:
! pr93727 EX Format Specifiers
program main
implicit none
real(4) :: r4
real(8) :: r8
r4 = 3.14158_4
r8 = 12.3456789_8
print *, r4, r8
end program main
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libfortran/97017] The function determine_precision is called twice for each formatted real write
2020-09-11 3:13 [Bug libfortran/97017] New: The function determine_precision is called twice for each formatted real write jvdelisle at charter dot net
@ 2020-10-05 20:37 ` dominiq at lps dot ens.fr
2023-10-13 20:19 ` jvdelisle at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-10-05 20:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97017
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Ever confirmed|0 |1
Priority|P3 |P4
Last reconfirmed| |2020-10-05
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
AFAICT determine_precision is called in two different branches of an IF, i.e.,
no performance penalty.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libfortran/97017] The function determine_precision is called twice for each formatted real write
2020-09-11 3:13 [Bug libfortran/97017] New: The function determine_precision is called twice for each formatted real write jvdelisle at charter dot net
2020-10-05 20:37 ` [Bug libfortran/97017] " dominiq at lps dot ens.fr
@ 2023-10-13 20:19 ` jvdelisle at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2023-10-13 20:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97017
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu.org
Status|WAITING |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jvdelisle at gcc dot gnu.org
--- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
I will take another look before closing this.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-13 20:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 3:13 [Bug libfortran/97017] New: The function determine_precision is called twice for each formatted real write jvdelisle at charter dot net
2020-10-05 20:37 ` [Bug libfortran/97017] " dominiq at lps dot ens.fr
2023-10-13 20:19 ` jvdelisle at gcc dot gnu.org
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).