[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: [Bug fortran/34306] New: misprinting of derived types
From: "dominiq at lps dot ens dot fr" <gcc-bugzilla () gcc ! gnu ! org>
Date: 2007-11-30 23:40:19
Message-ID: bug-34306-12313 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]
While looking at PR18022, I stumbled over the following problem illustrated by
the reduced code from the original one:
program test_bug
implicit none
character(len=2), dimension(4,2) :: tab_c
character(len=30) :: buf1, buf2
type :: point
character(len=2) :: x,y
end type point
type(point), dimension(4) :: pts
tab_c(:,1)(:) = (/'1','2','3','4'/)
tab_c(:,2)(:) = (/'2','3','4','5'/)
pts%x = tab_c(:,1)
pts%y = tab_c(:,2)
if (any(pts%x /= tab_c(:,1)) .or. any(pts%y /= tab_c(:,2))) call abort()
write (buf1, *) pts
write (buf2, *) tab_c
print *, buf1
print *, buf2
if (buf1 /= buf2) call abort()
end program test_bug
which gives
1 2 2 3 3 4 4 5
1 2 3 4 2 3 4 5
Abort
--
Summary: misprinting of derived types
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominiq at lps dot ens dot fr
GCC build triplet: i686-apple-darwin9
GCC host triplet: i686-apple-darwin9
GCC target triplet: i686-apple-darwin9
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34306
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic