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
This commit is contained in:
parent
e7c84bf8e9
commit
6019a1a447
@ -1,3 +1,9 @@
|
||||
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 (¤t_ts);
|
||||
t = build_struct (name, cl, &initializer, &as);
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
11
gcc/testsuite/gfortran.dg/der_pointer_4.f90
Normal file
11
gcc/testsuite/gfortran.dg/der_pointer_4.f90
Normal file
@ -0,0 +1,11 @@
|
||||
! {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
|
Loading…
Reference in New Issue
Block a user