URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [derived_pointer_recursion_2.f90] - Rev 801
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do run }
!
! PR 40594: [4.5 Regression] wrong-code
!
! Original test case by Daniel Franke <dfranke@gcc.gnu.org>
! Modified by Janus Weil <janus@gcc.gnu.org>
MODULE atom_types
TYPE :: atom_list
TYPE(atom_private), DIMENSION(:), pointer :: table
END TYPE
TYPE :: atom_private
TYPE(atom_list) :: neighbours
LOGICAL :: initialized = .true.
END TYPE
TYPE :: atom_model
TYPE(atom_list) :: atoms
integer :: dummy
END TYPE
contains
SUBROUTINE init(this)
TYPE(atom_private) :: this
this%initialized = .FALSE.
END SUBROUTINE
END MODULE
program pr40594
USE atom_types
TYPE(atom_model) :: am
type(atom_private) :: ap
am%dummy = 0
call init(ap)
if (ap%initialized .neqv. .false.) call abort()
END
! { dg-final { cleanup-modules "atom_types" } }
Go to most recent revision | Compare with Previous | Blame | View Log