This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/15365] New: Variable of derived type not initialized, unless declared with ::
- From: "lei at il dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 May 2004 14:06:21 -0000
- Subject: [Bug fortran/15365] New: Variable of derived type not initialized, unless declared with ::
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
% cat foo.f90
program main
type xyz
integer :: x = 123
end
type (xyz) :: a !! ok
type (xyz) b !!! not initialized !!!
print*, a%x, b%x
if (a%x.ne.123) call abort
if (b%x.ne.123) call abort
print*, "ok"
end
% a.out
123 -1073751820
Abort (core dumped)
--
Summary: Variable of derived type not initialized, unless
declared with ::
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: lei at il dot ibm dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15365