This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33554] Seg.fault: Default initialization of derived type uses initialized values
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Sep 2007 19:16:45 -0000
- Subject: [Bug fortran/33554] Seg.fault: Default initialization of derived type uses initialized values
- References: <bug-33554-6318@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from burnus at gcc dot gnu dot org 2007-09-25 19:16 -------
Work around: Change the intent to INOUT in:
subroutine construct_temp (temp)
type (t_temp), intent(out) :: temp (:)
or - which is effectively the same - remove the default initializer:
type t_datum
character(len=8) :: mn = ''
>From the dump:
construct_temp (temp)
{
int8 ubound.0;
int8 stride.1;
if (temp != 0)
{
{
int8 D.888;
int8 D.887;
D.887 = offset.2;
D.888 = ubound.0;
Question to the reader: Which value has ubound and offset in the assignment
above?
--
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
GCC host triplet|i686-pc-linux-gnu |
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2007-09-25 19:16:45
date| |
Summary|Runtime segfault with nested|Seg.fault: Default
|derived types with -O0 |initialization of derived
| |type uses initialized values
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33554