Commit 6019a1a4 by Erik Edelmann

re PR fortran/24426 (gfortran ICE for valid derived type definition with default initialization)

2005-10-22  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/24426
        * decl.c (variable_decl): Don't assign default initializers to
                    pointers.


2005-10-22  Erik Edelmann  <eedelman@gcc.gnu.org>

        PR fortran/24426
        * gfortran.dg/der_pointer_4.f90: New.

From-SVN: r105792
parent e7c84bf8
2005-10-22 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/24426
* decl.c (variable_decl): Don't assign default initializers to
pointers.
2005-10-21 Jakub Jelinek <jakub@redhat.com>
* interface.c (compare_actual_formal): Issue error when attempting
......
......@@ -1094,7 +1094,7 @@ variable_decl (int elem)
t = add_init_expr_to_sym (name, &initializer, &var_locus);
else
{
if (current_ts.type == BT_DERIVED && !initializer)
if (current_ts.type == BT_DERIVED && !current_attr.pointer && !initializer)
initializer = gfc_default_initializer (&current_ts);
t = build_struct (name, cl, &initializer, &as);
}
......
2005-10-22 Erik Edelmann <eedelman@gcc.gnu.org>
PR fortran/24426
* gfortran.dg/der_pointer_4.f90: New.
2005-10-22 David Ayers <d.ayers@inode.at>
* obj-c++.dg/except-1.mm: Simplify.
! {dg-do compile }
! PR 24426
! Pointer-components of derived type with initialized components
module crash
implicit none
type foo
integer :: i = 0
type (foo), pointer :: next
end type foo
type (foo) :: bar
end module crash
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment