* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
@ 2008-09-11 0:58 ` sdirkse at gams dot com
2008-09-11 6:03 ` burnus at gcc dot gnu dot org
` (19 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: sdirkse at gams dot com @ 2008-09-11 0:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from sdirkse at gams dot com 2008-09-11 00:56 -------
Created an attachment (id=16289)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16289&action=view)
test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
2008-09-11 0:58 ` [Bug fortran/37472] " sdirkse at gams dot com
@ 2008-09-11 6:03 ` burnus at gcc dot gnu dot org
2008-09-11 11:38 ` dominiq at lps dot ens dot fr
` (18 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-09-11 6:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from burnus at gcc dot gnu dot org 2008-09-11 06:01 -------
I cannot reproduce the problem with gfortran 4.1, 4.2, 4.3 or 4.4 on
x86-64-linux with either -m32 or -m64, which makes debugging not easier.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
2008-09-11 0:58 ` [Bug fortran/37472] " sdirkse at gams dot com
2008-09-11 6:03 ` burnus at gcc dot gnu dot org
@ 2008-09-11 11:38 ` dominiq at lps dot ens dot fr
2008-09-11 14:29 ` burnus at gcc dot gnu dot org
` (17 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-09-11 11:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dominiq at lps dot ens dot fr 2008-09-11 11:37 -------
I cannot reproduce it on ppc/intel Darwin9, however the following code:
PROGRAM bug
IMPLICIT NONE
DOUBLE PRECISION r
COMMON /gggg91/ r
DOUBLE PRECISION x
x = 1000
write(6,*) 'x = ', x
r = 1000
write(6,*) 'r = ', r
x = 1001
write(6,*) 'x = ', x
r = 1001
write(6,*) 'r = ', r
END
gives
x = 1000.00000000000
r = 1000.00000000000
x = 1001.00000000000
r = 1001.00000000000
with gfortran 4.2.3 and
x = 1000.00000000000000
r = 1000.00000000000000
x = 1001.0000000000000
r = 1001.0000000000000
with 4.3.2 and 4.4.0 (trunk). Is this expected?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (2 preceding siblings ...)
2008-09-11 11:38 ` dominiq at lps dot ens dot fr
@ 2008-09-11 14:29 ` burnus at gcc dot gnu dot org
2008-09-12 3:54 ` jvdelisle at gcc dot gnu dot org
` (16 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-09-11 14:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from burnus at gcc dot gnu dot org 2008-09-11 14:27 -------
Jerry, do you know why gfortran 4.3/4.4 prints one trailing zero more for 1000
than for other numbers? 4.2 used the same number of trailing digits.
1000.00000
1001.0000
for
print *, 1000.0
print *, 1001.0
end
If one uses 0.2 more, one gets the expected
1000.2000
1001.2000
And for 100.0 it is off by one again.
(Maybe you have also an idea about the problem in comment 0.)
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (3 preceding siblings ...)
2008-09-11 14:29 ` burnus at gcc dot gnu dot org
@ 2008-09-12 3:54 ` jvdelisle at gcc dot gnu dot org
2008-10-11 15:55 ` jvdelisle at gcc dot gnu dot org
` (15 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-09-12 3:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2008-09-12 03:52 -------
I will have to explore a bit.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (4 preceding siblings ...)
2008-09-12 3:54 ` jvdelisle at gcc dot gnu dot org
@ 2008-10-11 15:55 ` jvdelisle at gcc dot gnu dot org
2008-10-11 16:01 ` jvdelisle at gcc dot gnu dot org
` (14 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-10-11 15:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jvdelisle at gcc dot gnu dot org 2008-10-11 15:54 -------
I will be looking at this.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-10-11 15:54:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (5 preceding siblings ...)
2008-10-11 15:55 ` jvdelisle at gcc dot gnu dot org
@ 2008-10-11 16:01 ` jvdelisle at gcc dot gnu dot org
2008-11-17 5:04 ` jvdelisle at gcc dot gnu dot org
` (13 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-10-11 16:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jvdelisle at gcc dot gnu dot org 2008-10-11 15:59 -------
Response to comment #4. We added 1 to the default width in 4.3. The rest has
to do with the rounding logic. I dropped this bug in the crack, so assigned to
myself so i will not forget it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (6 preceding siblings ...)
2008-10-11 16:01 ` jvdelisle at gcc dot gnu dot org
@ 2008-11-17 5:04 ` jvdelisle at gcc dot gnu dot org
2008-11-21 4:32 ` jvdelisle at gcc dot gnu dot org
` (12 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-11-17 5:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jvdelisle at gcc dot gnu dot org 2008-11-17 05:03 -------
The shifting of the decimal point between 1000. and 1001. is an artefact of how
we compute the format specifiers in the OUTPUT_FLOAT macro in write_float.def.
I am working on a solution to that part of this.
The issue with the doubles in common I suspect is some sort of alignment issue,
but I do not see it here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (7 preceding siblings ...)
2008-11-17 5:04 ` jvdelisle at gcc dot gnu dot org
@ 2008-11-21 4:32 ` jvdelisle at gcc dot gnu dot org
2008-11-21 4:38 ` jvdelisle at gcc dot gnu dot org
` (11 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-11-21 4:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jvdelisle at gcc dot gnu dot org 2008-11-21 04:31 -------
Subject: Bug 37472
Author: jvdelisle
Date: Fri Nov 21 04:29:54 2008
New Revision: 142079
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142079
Log:
2008-11-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/37472
* io/write_float.def (output_float_FMT_G_): Adjust conversion of
G format specification to F format.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/write_float.def
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (8 preceding siblings ...)
2008-11-21 4:32 ` jvdelisle at gcc dot gnu dot org
@ 2008-11-21 4:38 ` jvdelisle at gcc dot gnu dot org
2008-11-21 4:40 ` jvdelisle at gcc dot gnu dot org
` (10 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-11-21 4:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jvdelisle at gcc dot gnu dot org 2008-11-21 04:36 -------
Subject: Bug 37472
Author: jvdelisle
Date: Fri Nov 21 04:35:17 2008
New Revision: 142080
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142080
Log:
2008-11-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/37472
* gfortran.dg/namelist_print_1.f: Update test.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/namelist_print_1.f
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (9 preceding siblings ...)
2008-11-21 4:38 ` jvdelisle at gcc dot gnu dot org
@ 2008-11-21 4:40 ` jvdelisle at gcc dot gnu dot org
2008-12-13 15:31 ` jvdelisle at gcc dot gnu dot org
` (9 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-11-21 4:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jvdelisle at gcc dot gnu dot org 2008-11-21 04:38 -------
The above patch only fixes a portion of this bug. The remaining is I have not
been able to "see" the problem yet. I have access to a solaris machine now,
but have not been able to build gfortran yet.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (10 preceding siblings ...)
2008-11-21 4:40 ` jvdelisle at gcc dot gnu dot org
@ 2008-12-13 15:31 ` jvdelisle at gcc dot gnu dot org
2008-12-21 5:30 ` jvdelisle at gcc dot gnu dot org
` (8 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-12-13 15:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from jvdelisle at gcc dot gnu dot org 2008-12-13 15:29 -------
I am trying not to lose sight of the original problem in comment zero.
However, the decimal output alignment problem fixed in comment 9 still exists
with -m32 on x86-64 and I can see it with 32 bit windows as well. There a a
similar shifting in pr38504.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (11 preceding siblings ...)
2008-12-13 15:31 ` jvdelisle at gcc dot gnu dot org
@ 2008-12-21 5:30 ` jvdelisle at gcc dot gnu dot org
2008-12-21 13:36 ` dominiq at lps dot ens dot fr
` (7 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-12-21 5:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from jvdelisle at gcc dot gnu dot org 2008-12-21 05:28 -------
This little patch eliminates the misalignment of output characters with -m32
and gets rid of a many many valgrind errors.
@@ -628,7 +637,7 @@ output_float_FMT_G_ ## x (st_parameter_d
\
while (low <= high)\
{ \
- GFC_REAL_ ## x temp;\
+ float temp;\
mid = (low + high) / 2;\
\
temp = 0.1 * calculate_exp_ ## x (mid) - 0.5\
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (12 preceding siblings ...)
2008-12-21 5:30 ` jvdelisle at gcc dot gnu dot org
@ 2008-12-21 13:36 ` dominiq at lps dot ens dot fr
2008-12-22 14:56 ` jvdelisle at gcc dot gnu dot org
` (6 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-12-21 13:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from dominiq at lps dot ens dot fr 2008-12-21 13:34 -------
> This little patch eliminates the misalignment of output characters with -m32
> and gets rid of a many many valgrind errors.
>
> @@ -628,7 +637,7 @@ output_float_FMT_G_ ## x (st_parameter_d
> \
> while (low <= high)\
> { \
> - GFC_REAL_ ## x temp;\
> + float temp;\
> mid = (low + high) / 2;\
> \
> temp = 0.1 * calculate_exp_ ## x (mid) - 0.5\
Do you understand why? Such a change is the opposite of what I understand of
the GFC_REAL_* machinery, although I have no knowledge about mixed calculations
in C.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (13 preceding siblings ...)
2008-12-21 13:36 ` dominiq at lps dot ens dot fr
@ 2008-12-22 14:56 ` jvdelisle at gcc dot gnu dot org
2008-12-22 16:30 ` dominiq at lps dot ens dot fr
` (5 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-12-22 14:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from jvdelisle at gcc dot gnu dot org 2008-12-22 14:55 -------
Subject: Bug 37472
Author: jvdelisle
Date: Mon Dec 22 14:53:37 2008
New Revision: 142884
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142884
Log:
2008-12-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/37472
* io/write_float.def (output_float_FMT_G_): Modify calculation of temp
to avoid sensitivity to round-off.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/write_float.def
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (14 preceding siblings ...)
2008-12-22 14:56 ` jvdelisle at gcc dot gnu dot org
@ 2008-12-22 16:30 ` dominiq at lps dot ens dot fr
2008-12-22 20:38 ` sdirkse at gams dot com
` (4 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-12-22 16:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from dominiq at lps dot ens dot fr 2008-12-22 16:29 -------
>From http://gcc.gnu.org/ml/fortran/2008-12/msg00284.html:
> With Steve Kargl's help, the following simple patch was found to eliminate this output
> problem on x86-64. I plan to commit under simple and makes sense to do rule.
Is not the same problem lurking in
if ((m > 0.0 && m < 0.1 - 0.05 / exp_d) || (m >= exp_d - 0.5 ) ||\
with 0.1 and 0.05?
Also there is probably some room for optimization in this piece of code. For
instance calculate_exp_* computes 10**d through an algorithm linear in d, while
it could be computed in O(log2(d)) (see poweri in gcc/builtins.c). Also the
following change:
--- /opt/gcc/_gcc_clean/libgfortran/io/write_float.def 2008-12-21
22:31:05.000000000 +0100
+++ /opt/gcc/gcc-4.4-work/libgfortran/io/write_float.def 2008-12-22
16:27:10.000000000 +0100
@@ -640,8 +640,8 @@
GFC_REAL_ ## x temp;\
mid = (low + high) / 2;\
\
- temp = 0.1 * calculate_exp_ ## x (mid) - 0.5\
- * calculate_exp_ ## x (mid - d - 1);\
+ temp = calculate_exp_ ## x (mid) \
+ * (1.0 - 0.5 / exp_d) / 10;\
\
if (m < temp)\
{ \
speeds up by ~2s the following test:
character(80) s
real*8 x, y
integer i
x=1.0
y=0.0
do i = 1, 10000000
write(s,*) y
y = y + x
end do
print *, s
end
(still twice slower with gfortran than ifort or g77).
Note that "temp = calculate_exp_ ## x (mid-1) * (1.0 - 0.5 / exp_d)" is
slightly slower.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (15 preceding siblings ...)
2008-12-22 16:30 ` dominiq at lps dot ens dot fr
@ 2008-12-22 20:38 ` sdirkse at gams dot com
2008-12-22 21:04 ` kargl at gcc dot gnu dot org
` (3 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: sdirkse at gams dot com @ 2008-12-22 20:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from sdirkse at gams dot com 2008-12-22 20:37 -------
After all the updates committed for this bug, I thought I'd try the latest,
including updating to ggmp-4.2.4 and mpfr-2.3.2. Here's the result for the GCC
4.3.2 release and the latest GCC. Note that the 32-bit stuff hasn't changed
and now I get all-stars output for *both* outputs in 64-bit, not just one of
the outputs.
sigvm:/export/home/distrib/lang/f90$/usr/local2/bin/gfortran -v
Using built-in specs.
Target: i386-pc-solaris2.10
Configured with: ../configure CC=gcc --prefix=/usr/local2
--build=i386-pc-solaris2.10 --with-gnu-as --with-as=/usr/local/bin/as
--without-gnu-ld --with-ld=/usr/ccs/bin/ld --with-gmp=/usr/local
--with-mpfr=/usr/local --enable-languages=c,c++,fortran --enable-shared
Thread model: posix
gcc version 4.3.2 (GCC)
sigvm:/export/home/distrib/lang/f90$cat bug.f
PROGRAM bug
IMPLICIT NONE
DOUBLE PRECISION r
COMMON /gggg91/ r
DOUBLE PRECISION x
x = 1001
write(6,*) 'x = ', x
r = 1000
write(6,*) 'r = ', r
END
sigvm:/export/home/distrib/lang/f90$/usr/local2/bin/gfortran -o bug32 -m32
bug.f
sigvm:/export/home/distrib/lang/f90$/usr/local2/bin/gfortran -o bug64 -m64
bug.f
sigvm:/export/home/distrib/lang/f90$./bug32
x = 1001.0000000000000
r = 1000.00000000000000
sigvm:/export/home/distrib/lang/f90$./bug64
x = 1001.0000000000000
r = ********************
sigvm:/export/home/distrib/lang/f90$/usr/local3/bin/gfortran -v
Using built-in specs.
Target: i386-pc-solaris2.11
Configured with: ../configure CC=gcc --prefix=/usr/local3
--build=i386-pc-solaris2.11 --with-gnu-as --with-as=/usr/local/bin/as
--without-gnu-ld --with-ld=/usr/ccs/bin/ld --with-gmp=/usr/local
--with-mpfr=/usr/local --enable-languages=c,c++,fortran --enable-shared
Thread model: posix
gcc version 4.4.0 20081222 (experimental) (GCC)
sigvm:/export/home/distrib/lang/f90$/usr/local3/bin/gfortran -o bug32 -m32
bug.f
sigvm:/export/home/distrib/lang/f90$/usr/local3/bin/gfortran -o bug64 -m64
bug.f
sigvm:/export/home/distrib/lang/f90$./bug32
x = 1001.0000000000000
r = 1000.00000000000000
sigvm:/export/home/distrib/lang/f90$./bug64
x = ********************
r = ********************
sigvm:/export/home/distrib/lang/f90$
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (16 preceding siblings ...)
2008-12-22 20:38 ` sdirkse at gams dot com
@ 2008-12-22 21:04 ` kargl at gcc dot gnu dot org
2008-12-22 21:29 ` jvdelisle at gcc dot gnu dot org
` (2 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: kargl at gcc dot gnu dot org @ 2008-12-22 21:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #18 from kargl at gcc dot gnu dot org 2008-12-22 21:03 -------
(In reply to comment #17)
> After all the updates committed for this bug, I thought I'd try the latest,
> including updating to ggmp-4.2.4 and mpfr-2.3.2. Here's the result for the GCC
> 4.3.2 release and the latest GCC. Note that the 32-bit stuff hasn't changed
> and now I get all-stars output for *both* outputs in 64-bit, not just one of
> the outputs.
The audit trail shows that patch hasn't been back ported to 4.3.x
branch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (17 preceding siblings ...)
2008-12-22 21:04 ` kargl at gcc dot gnu dot org
@ 2008-12-22 21:29 ` jvdelisle at gcc dot gnu dot org
2009-05-02 23:29 ` jvdelisle at gcc dot gnu dot org
2010-04-16 23:03 ` [Bug fortran/37472] bad output on default-format write of double in common block with -m64 jvdelisle at gcc dot gnu dot org
20 siblings, 0 replies; 22+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-12-22 21:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #19 from jvdelisle at gcc dot gnu dot org 2008-12-22 21:27 -------
Yes, so far I am only working with 4.4. Regardless, it appears that on this
platform the width is being computed incorrectly. I count 20 stars in the
field width. The required field width for the output on x86-64 is 28. So
there is an off by one 8-byte word going on here.
I suspect that the decimal point shifting problem which is now fixed on 4.4 is
a separate problem. I will keep at it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64 flag i
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (18 preceding siblings ...)
2008-12-22 21:29 ` jvdelisle at gcc dot gnu dot org
@ 2009-05-02 23:29 ` jvdelisle at gcc dot gnu dot org
2010-04-16 23:03 ` [Bug fortran/37472] bad output on default-format write of double in common block with -m64 jvdelisle at gcc dot gnu dot org
20 siblings, 0 replies; 22+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-05-02 23:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #20 from jvdelisle at gcc dot gnu dot org 2009-05-02 23:29 -------
Unassigning, time constraints
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|jvdelisle at gcc dot gnu dot|unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug fortran/37472] bad output on default-format write of double in common block with -m64
2008-09-11 0:57 [Bug fortran/37472] New: bad output on default-format write of double in common block with -m64 flag i sdirkse at gams dot com
` (19 preceding siblings ...)
2009-05-02 23:29 ` jvdelisle at gcc dot gnu dot org
@ 2010-04-16 23:03 ` jvdelisle at gcc dot gnu dot org
20 siblings, 0 replies; 22+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-04-16 23:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #21 from jvdelisle at gcc dot gnu dot org 2010-04-16 23:03 -------
Closing, no further information available
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37472
^ permalink raw reply [flat|nested] 22+ messages in thread