[Bug fortran/34202] New: ICE (segfault) for invalid code in formalize_init_expr (data.c:691)
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Nov 23 08:46:00 GMT 2007
Found at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/c8dd08d6da052499/
Test case created by James Van Buskirk.
The following code gives an ICE after diagnosing the error in "size[1]" (which
is by the way valid Fortran 2008 syntax for a coarray "size".)
==26143== Invalid read of size 8
==26143== at 0x413A27: formalize_init_expr (data.c:691)
==26143== by 0x470EA6: traverse_ns (symbol.c:2951)
==26143== by 0x470E95: traverse_ns (symbol.c:2948)
==26143== by 0x470E95: traverse_ns (symbol.c:2948)
==26143== by 0x470E95: traverse_ns (symbol.c:2948)
==26143== by 0x46081F: resolve_types (resolve.c:8929)
program bug4a
implicit none
type bug4
! Intentionally left empty
end type bug4
type compound
integer a
type(bug4) b
type(bug4) c
integer d
type(bug4) e
end type compound
type(bug4) t
type(compound) c
type(bug4), parameter :: f = bug4()
type(compound), parameter :: g = compound(1,f,bug4(),4,f)
type other
real x(0)
end type other
c = compound(1,t,t,4,t)
write(*,*) c
write(*,*) g%d
write(*,*) size(transfer(1,[bug4()]))
write(*,*) size(transfer(1,['']))
write(*,*) size(transfer(1,[other()]))
write(*,*) transfer(transfer([1],[bug4()]),[1],size[1])
end program bug4a
--
Summary: ICE (segfault) for invalid code in formalize_init_expr
(data.c:691)
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34202
More information about the Gcc-bugs
mailing list