public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/31915] New: Failure with unf_io_convert_3.f90
@ 2007-05-14 0:13 jvdelisle at gcc dot gnu dot org
2007-05-14 6:51 ` [Bug libfortran/31915] " burnus at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2007-05-14 0:13 UTC (permalink / raw)
To: gcc-bugs
With Dominique's fix so that the test case runs, I get failure.
Here is a slightly modified version to illustrate:
! { dg-do run }
! { dg-require-effective-target fortran_large_real }
program main
integer,parameter :: k = selected_real_kind (precision (0.0_8) + 1)
real(kind=k) a,b,c
a = 1.1_k
open(10,convert="swap",form="unformatted") ! { dg-warning "Extension:
CONVERT" }
write(10) a
backspace 10
read (10) b
close(10,status="delete")
print *, a, b
!if (a /= b) call abort
write (11) a
backspace 11
open (11,form="unformatted")
read (11) c
print *, a, c
if (a .ne. c) call abort
close (11, status="delete")
end program main
The first test fails miserably.
$ ./a.out
1.100000000000000000 3.9138956899828401554E-4942
1.100000000000000000 1.100000000000000000
I gather that this will not show up on some platforms.
--
Summary: Failure with unf_io_convert_3.f90
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jvdelisle at gcc dot gnu dot org
GCC host triplet: x86-64-pc-Linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31915
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libfortran/31915] Failure with unf_io_convert_3.f90
2007-05-14 0:13 [Bug libfortran/31915] New: Failure with unf_io_convert_3.f90 jvdelisle at gcc dot gnu dot org
@ 2007-05-14 6:51 ` burnus at gcc dot gnu dot org
2007-05-14 20:20 ` patchapp at dberlin dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-05-14 6:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2007-05-14 07:51 -------
Same here, native and little_endian work, but big_endian/swap produces the
wrong number (here: NaN). It also works if one does not use real(10) but
real(8)
If I run the created program through valgrind:
==26772== Syscall param write(buf) points to uninitialised byte(s)
==26772== at 0x55FB550: write (in /lib64/libc-2.5.so)
==26772== by 0x4EBB760: do_write (unix.c:300)
==26772== by 0x4EBB7DD: fd_flush (unix.c:359)
==26772== by 0x4EB01DF: _gfortran_st_backspace (file_pos.c:226)
==26772== by 0x400B36: MAIN__ (pr31915.f90:9)
==26772== by 0x400E4D: main (fmain.c:18)
==26772== Address 0x4051781 is 153 bytes inside a block of size 8,344 alloc'd
==26772== at 0x4C22D06: malloc (in
/usr/lib64/valgrind/amd64-linux/vgpreload_memcheck.so)
==26772== by 0x4E3DCB8: _gfortrani_get_mem (memory.c:53)
==26772== by 0x4EBB9C9: fd_to_stream (unix.c:1012)
==26772== by 0x4EBC72F: _gfortrani_open_external (unix.c:1289)
==26772== by 0x4EB56F7: _gfortrani_new_unit (open.c:374)
==26772== by 0x4EB5E59: _gfortran_st_open (open.c:531)
==26772== by 0x400AAB: MAIN__ (pr31915.f90:7)
==26772== by 0x400E4D: main (fmain.c:18)
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |wrong-code
Known to fail| |4.3.0 4.2.0 4.1.2
Last reconfirmed|0000-00-00 00:00:00 |2007-05-14 07:51:03
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31915
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libfortran/31915] Failure with unf_io_convert_3.f90
2007-05-14 0:13 [Bug libfortran/31915] New: Failure with unf_io_convert_3.f90 jvdelisle at gcc dot gnu dot org
2007-05-14 6:51 ` [Bug libfortran/31915] " burnus at gcc dot gnu dot org
@ 2007-05-14 20:20 ` patchapp at dberlin dot org
2007-05-15 10:17 ` burnus at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: patchapp at dberlin dot org @ 2007-05-14 20:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from patchapp at dberlin dot org 2007-05-14 21:20 -------
Subject: Bug number PR 31915
A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is
http://gcc.gnu.org/ml/gcc-patches/2007-05/msg00907.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31915
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libfortran/31915] Failure with unf_io_convert_3.f90
2007-05-14 0:13 [Bug libfortran/31915] New: Failure with unf_io_convert_3.f90 jvdelisle at gcc dot gnu dot org
2007-05-14 6:51 ` [Bug libfortran/31915] " burnus at gcc dot gnu dot org
2007-05-14 20:20 ` patchapp at dberlin dot org
@ 2007-05-15 10:17 ` burnus at gcc dot gnu dot org
2007-05-15 10:29 ` [Bug libfortran/31915] [4.2 only] " burnus at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-05-15 10:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2007-05-15 11:17 -------
Subject: Bug 31915
Author: burnus
Date: Tue May 15 10:16:46 2007
New Revision: 124741
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124741
Log:
2007-05-15 Tobias Burnus <burnus@net-b.de>
PR libfortran/31915
* io/transfer.c (unformatted_read): Use proper size for real(10).
(unformatted_write): Ditto.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/transfer.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31915
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libfortran/31915] [4.2 only] Failure with unf_io_convert_3.f90
2007-05-14 0:13 [Bug libfortran/31915] New: Failure with unf_io_convert_3.f90 jvdelisle at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-05-15 10:17 ` burnus at gcc dot gnu dot org
@ 2007-05-15 10:29 ` burnus at gcc dot gnu dot org
2007-05-22 14:28 ` burnus at gcc dot gnu dot org
2007-05-22 14:28 ` [Bug libfortran/31915] " burnus at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-05-15 10:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from burnus at gcc dot gnu dot org 2007-05-15 11:29 -------
Filled PR 31933 for the valgrind errors. These seem to be related to REAL(10),
but are independent of convert.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |burnus at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2007-05-14 07:51:03 |2007-05-15 11:29:03
date| |
Summary|Failure with |[4.2 only] Failure with
|unf_io_convert_3.f90 |unf_io_convert_3.f90
Target Milestone|--- |4.2.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31915
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libfortran/31915] [4.2 only] Failure with unf_io_convert_3.f90
2007-05-14 0:13 [Bug libfortran/31915] New: Failure with unf_io_convert_3.f90 jvdelisle at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-05-15 10:29 ` [Bug libfortran/31915] [4.2 only] " burnus at gcc dot gnu dot org
@ 2007-05-22 14:28 ` burnus at gcc dot gnu dot org
2007-05-22 14:28 ` [Bug libfortran/31915] " burnus at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-05-22 14:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from burnus at gcc dot gnu dot org 2007-05-22 15:28 -------
Subject: Bug 31915
Author: burnus
Date: Tue May 22 14:27:53 2007
New Revision: 124944
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124944
Log:
libgfortran/
2007-05-22 Tobias Burnus <burnus@net-b.de>
PR libfortran/31915
Backport from trunk.
* io/transfer.c (unformatted_read): Use proper size for real(10).
(unformatted_write): Ditto.
testsuite/
2007-05-22 Dominique d'Humieres <dominiq@lps.ens.fr>
* gfortran.dg/unf_io_convert_3.f90: Fix dg directive.
Modified:
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/unf_io_convert_3.f90
branches/gcc-4_2-branch/libgfortran/ChangeLog
branches/gcc-4_2-branch/libgfortran/io/transfer.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31915
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libfortran/31915] Failure with unf_io_convert_3.f90
2007-05-14 0:13 [Bug libfortran/31915] New: Failure with unf_io_convert_3.f90 jvdelisle at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-05-22 14:28 ` burnus at gcc dot gnu dot org
@ 2007-05-22 14:28 ` burnus at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-05-22 14:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from burnus at gcc dot gnu dot org 2007-05-22 15:28 -------
Fixed for 4.2.1.
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Summary|[4.2 only] Failure with |Failure with
|unf_io_convert_3.f90 |unf_io_convert_3.f90
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31915
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-05-22 14:28 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-14 0:13 [Bug libfortran/31915] New: Failure with unf_io_convert_3.f90 jvdelisle at gcc dot gnu dot org
2007-05-14 6:51 ` [Bug libfortran/31915] " burnus at gcc dot gnu dot org
2007-05-14 20:20 ` patchapp at dberlin dot org
2007-05-15 10:17 ` burnus at gcc dot gnu dot org
2007-05-15 10:29 ` [Bug libfortran/31915] [4.2 only] " burnus at gcc dot gnu dot org
2007-05-22 14:28 ` burnus at gcc dot gnu dot org
2007-05-22 14:28 ` [Bug libfortran/31915] " burnus at gcc dot gnu dot 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).